Atomia Performance Monitoring

Configuring the Performance Logging Component

18 views 0

Performance Logging Component properties

Several properties of Performance Logging Component can be configured:

PROPERTY NAME XML NAME DESCRIPTION DEFAULT VALUE
Power switch powerSwitch Turns on/off performance logging false
Application name applicationName The name of the monitored application
Log buffer size bufferSize Size of the log buffer, value of 1 result in immediate reflection on Results page 1
Log buffer write URL writeUrl Destination url for writing performance logs .\private$\AtomiaPerformance
Log buffer writer class writerType Fully qualified type name of the writer class Atomia.Performance.Logging.IO.MessageQueueWriter
Filter name filterName Name of the filter to be applied on initial call CallName
Filter value value Value which is supplied to the filter (e.g. regular expression) \.jpg|\.css|\.js|\.png|\.gif|\.axd|\.ico |
Filter type type The type of the filter (exclude or include) indicating whether to include or exclude matched calls exclude

Logging of inner application calls

Logging of inner application calls is done by adding pieces of code in each method. All method body should be surrounded by using the following statement:

            using (var timer = DiagnosticHelper.NewTimer(ProfilingType.ApplicationEnter))            
            {            
            // method body            
            }

Using block instatinates new Timer object with method and time info. Timer is stopped when its Dispose() method is called (end of using block). If method has sub-calls to other methods, those calls will be logged as children of first call (chaining of calls is done automatically through ExecutionContext)

These blocks can be executed if application is built in Debug mode only. To improve the readability of the code, blocks should be put inside #region directives (in order to hide them on initial editing).

            #region debug            
            #if DEBUG            
            using (var timer = DiagnosticHelper.NewTimer(ProfilingType.ApplicationEnter))            
            {            
            #endif            
            #endregion            
            // method body           
            #region debug           
            #if  DEBUG           
            }           
            #endif            
            #endregion

Was this helpful?