Dotnet Performance Counter : CLR Class loaders assemblies.

In this article we are going to know about performance counters related to Class loaders, assemblies, app domains inside CLR.
As we monitor dotnet run time environment (CLR) during performance test, we need to know what to look for if we are measuring performance affected by Class loaders, assemblies, app domains inside CLR.  For basic idea of CLR, please see this post.


Related to Class loader :

Bytes in Loader Heap : Class loader committed memory (in RAM)across all app domain.

Current Classes Loaded : Current number of classes loaded in all assemblies.

Rate of Classes Loaded (/sec) : Rate of classes loaded in all assemblies in the last two collected samples.

Rate of Load Failures(/sec) : Rate of classes failed to load in all assemblies in the last two collected samples.

Total Number of Load Failures : Count of failed to load class since the application started.

For performance measurement, failure counts(total and rate) are very important to identify the events. This should be trigger for big errors. So, need to carefully monitor the failure heuristics and related falures.

Total Classes Loaded : Cumulative Count of loaded classes in all assemblies since the application started.


Related to Assembly: 

Current Assemblies : Current number of loaded assemblies in all app domains for a running application.

Rate of Assemblies(/sec) : Rate of assemblies loading across all app domain in the last two collected samples.

Total Assemblies : Counts total number of loaded assemblies since the application started. 

Note : If an assembly is loaded as domain-neutral from other app domains, it counts only once for all type of assembly counters.


Related to App Domain :

Current app domains : Current app domain numbers loaded in the app. 

Rate of app domains (/sec): Rate of app domain loading in the last two collected samples.

Rate of app domains unloaded (/sec): Rate of app domain unloading in the last two collected samples.

Total App domains : Count of all loaded app domains since app started.

Total app domains unloaded : Count of all unloaded app domains since app started.
(for multiple loading same app domains, it is counted multiple times)

For performance monitoring, all loading and unloading rate is more important as they indicate performance of CLR.


Thanks ...:)