The statistics file includes running totals, the most recent value (last datum), count (n), average (mean), minimum and maximum values for the counters. I've included an example file at the end of this post. For counters where a given column is not relevant, a hyphen (-) is logged.I will use the following format to describe each counter.Counter nameBrief description of the counterDiscussion of the contents of relevant columns (total, last datum, n, mean, min, max)Any additional comments relating to the counterLocks and Threads CountersWriting well performing multi-threaded applications is one of the more challenging aspects of software development. Along with the performance considerations of single-threaded applications (memory usage, etc), thread scheduling and data access synchronization can impact how well your application performs. The counters described below can help identify threading related performance issues by providing data regarding thread, timer and lock usage during the run time of your application.Threads in Thread PoolThe number of threads currently in the thread pool.last datum: The current number of threads in the thread pooln: The number of threads created in the thread poolmean: The average number of threads in the thread pool during the run time of the applicationmin: The smallest number of threads in the thread pool during the run time of the applicationmax: The largest number of threads in the thread pool during the run time of the applicationPlease note: the Threads in Thread Pool counter does not count threads started using the Thread.Start method. Threads counted by this counter are those started via ThreadPool.QueueUserWorkItem.Pending TimersThe number of timers currently waiting to fire.last datum: The current number of pending timersn: The number of timer events which have been queuedmean: The average number of timers pending during the run time of the applicationmin: The fewest number of timers pending during the run time of the applicationmax: The largest number of timers pending during the run time of the applicationScheduled TimersThe number of timers that are currently running for scheduled to run.total: Running total of timers that have been scheduled during your application's run timeTimers Delayed by Thread Pool LimitThe count of timers that have been delayed by the thread pool limit.total: Running total of timers that were waiting for a thread pool threadWork Items QueuedThe count of items queued to the thread pool.total: Running total of all managed work items that have been queued to the thread pool.Uncontested Monitor.Enter CallsCount of calls made to Monitor.Enter that are not contested.total: Running total of uncontested calls to Monitor.EnterContested Monitor.Enter CallsCount of calls made to Monitor.Enter with lock contention.total: Running total of contested calls to Monitor.EnterIn multi-threaded applications, if Thread1 is holding a lock and Thread2 needs to access code that is guarded by the lock (currently held by Thread1) the Contested Monitor.Enter Calls counter is incremented.Example statistics fileI have highlighted the counters discussed here with a yellow background.
Take care,-- DK[Edit: update counter table to fix errors][Edit: post titles]Disclaimer(s):This posting is provided "AS IS" with no warranties, and confers no rights.