Dotnet Web Performance Counter : CLR Network (Asp Dotnet)

In this article we are going to know about performance counters of CLR network. Application sending and receiving data will be observed in CLR boundary as it is our interested topics. This post will show performance counters only. So, it will be more applicable for asp.net/web apps.

CPU/Thread Related Counters :(Very important to track performance) 

HttpWebRequests Created/sec : Rate of creating HttpWebRequest objects per second inside AppDomain.

HttpWebRequests Queued/sec : Rate of adding HttpWebRequest object to the queue per sec inside AppDomain.

HttpWebRequests Aborted/sec: Rate of Abort Method calling per second in HttpWebRequest objects inside AppDomain.

HttpWebRequests Failed/sec: Rate of failed HttpWebRequest objects per second inside AppDomain. This is measured by observing http status code failure (not 200-299) from server.

Time Counters: (Important performance counters)

HttpWebRequest Average Lifetime: Last interval (sample) ended average completion time for all HttpWebRequest objects inside AppDomain since the process started.
>Calculation for a single time: Time start when object created and ends when the object responses (to response stream).
>If  GetResponse or BeginGetResponse methods are not called by app then the lifetime of the HttpWebRequest object is ignored.
>If exception occurred(while calling GetResponse or EndGetResponse methods) the lifetime ends.

HttpWebRequest Average Queue Time : Average Time-On-Queue for all HttpWebRequest objects that left the queue inside AppDomain since the process started in the last interval(sample).

Data Counters : (important when memory issues are present) 

Bytes Received : Total (cumulative) bytes received by all socket objects inside an App Domain since the process started.

Bytes Sent : Total(cumulative) bytes sent by all socket objects within an AppDomain since the process started.

Note : These bytes are not defined by TCP/IP as it is inside CLR.

Connection Object counters : 

Connections Established: Total(cumulative) number of Socket objects connected inside AppDomain for stream sockets since the process started.

Datagrams Received : Total(cumulative) datagram packets received by all Socket objects inside AppDomain since the process started.

Datagrams Sent : Total(cumulative) datagram packets sent by all Socket objects inside AppDomain since the process started.

>These connection counters are measured by monitoring Socket class calls.

Note : 
-> For asp.net application pool, the process name used to be w3wp.exe or wp.exe.

Thanks..:)