![clr browser source plugin clr browser source plugin](https://i.ytimg.com/vi/CZiSI8Ff8Sc/maxresdefault.jpg)
WithContentionStats() // Contention event Take an example:Ĭollect CLR metrics using the default collector DotNetRuntimeStatsBuilder.Default().StartCollecting() Ĭollect CLR metrics using a custom collector DotNetRuntimeStatsBuilder.Customize() One is that the author provides a default collector to collect all supported CLR indicator information, and the other is to customize the CLR indicator types to be collected.
#CLR BROWSER SOURCE PLUGIN CODE#
If necessary, you can go to the source code and have a look I don’t think they are of great significance. The indicators listed above are more important indicators in my opinion, as well as some indicators of ThreadPool scheduling and CLR exception. Total time spent in JIT compiler (seconds)
![clr browser source plugin clr browser source plugin](https://i.ytimg.com/vi/rCLY3kVOiME/mqdefault.jpg)
![clr browser source plugin clr browser source plugin](http://www.catchexception.org/screenshot-swf-wrapping.png)
The total number of methods compiled by the JIT compiler Number of objects waiting to be finalized Size the total number of bytes allocated on the object heap (updated every 100 kb) The percentage of time the process spent pausing for garbage collectionĬurrent size of each GC heap (updated after garbage collection) Percentage of process CPU time spent running garbage collection Statistics of the reasons for triggering GC garbage collection Time spent in pause caused by GC recycle (seconds) Time spent executing GC recycle process (seconds) Number of active threads in io thread pool (windowsonly)Ĭaptures information pertaining to garbage collection, to help in diagnostics and debugging. Number of active threads in the thread pool Worker thread thread pool and IO thread pool information Name Total number of locks acquired by lock contention Total time taken (seconds) for lock contention to occur Supported indicators Contention EventsĪs long as the a lock or native lock is in contention, a contention event will be raised.Ĭontention occurs when a lock that a thread is waiting for is occupied by another thread. Even if your application is well instrumented, you’re only getting half the story- what the runtime is doing completes the picture. These metrics are essential for understanding the peformance of any non-trivial application. Thread pool size, scheduling delays and reasons for growing/ shrinking.JIT compilations and JIT CPU consumption ratio.Bytes allocated by small/ large object heap.Garbage collection collection frequencies and timings by generation/ type, pause timings and GC CPU consumption ratio.Let’s take a look at the official introductionĪ plugin for the prometheus-net package, exposing. Prometheus-net.DotNetRuntimeintroduce IntroĪs mentioned in the previous article on integrating Prometheus, prometheus-net.DotNetRuntimeSome CLR data can be obtained, such as GC, ThreadPool, content, JIT and other indicators, which can help us solve many problems to a great extent, such as whether GC often occurs during application execution, whether GC waiting time is too long, whether there is life and death lock or competition lock for too long, and whether there is thread pool starvation, With these indicators, we can clearly understand this information at run time.