Click here to Skip to main content
15,896,393 members
Articles / Web Development / ASP.NET

TraceNet: Trace method level performance for DLLs in ASP.NET applications without writing any performance tracing code!

Rate me:
Please Sign up or sign in to vote.
4.82/5 (29 votes)
2 Dec 2010CPOL19 min read 82.8K   663   75  
A component that allows you to view tracing information for methods written within classes in managed DLLs, and for this, you don't need to write any tracing code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace TraceNet.Output
{
    /// <summary>
    /// An entity for storing Trace information
    /// </summary>
    public class TraceEntry : IComparer<TraceEntry>
    {
        public int Indent
        {
            get;
            set;
        }

        public string MethodName
        {
            get;
            set;
        }

        public double MilliSeconds
        {
            get;
            set;
        }

        public int Serial
        {
            get;
            set;
        }

        public Hashtable Parameters
        {
            get;
            set;
        }

        public Exception Exception
        {
            get;
            set;
        }

        public object ReturnValue
        {
            get;
            set;
        }

        public bool IsWebMethod
        {
            get;
            set;
        }

        public TraceEntry(int Indent, string MethodName, double MilliSeconds, Hashtable Parameters, int Serial, object ReturnValue,bool IsWebMethod)
        {
            this.Indent = Indent;
            this.MethodName = MethodName;
            this.MilliSeconds = MilliSeconds;
            this.Parameters = Parameters;
            this.Serial = Serial;
            this.ReturnValue = ReturnValue;
            this.IsWebMethod = IsWebMethod;
        }

        public TraceEntry() { }

      
        #region IComparer<TraceEntry> Members

        public int Compare(TraceEntry x, TraceEntry y)
        {
            return x.Serial - y.Serial;
        }

        #endregion
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder SmartAspects
Bangladesh Bangladesh
I write codes to make life easier, and that pretty much describes me.

Comments and Discussions