开发者

Finding number of runs for the .NET garbage collector for a executing application

开发者 https://www.devze.com 2022-12-20 16:51 出处:网络
My question is with regard to the .NET garbage collector. For any executing application, can I find out the number of times the GC 开发者_如何学运维has run (including the generation numbers for that c

My question is with regard to the .NET garbage collector. For any executing application, can I find out the number of times the GC 开发者_如何学运维has run (including the generation numbers for that collection) and how much time was spent on the same?

I could find a lot of explanation on the internal framework and working of the GC on sites as such msdn, red-gate, stack overflow etc. but none on the above question.

Thanks in advance,

Bharath K


This information is available in performance counters.

Go to Computer Management, Performance Monitoring, and add # Gen x Collections under .Net CLR Memory.
The exact steps vary by OS.


There are sveral performance counters which provide information about the .Net Memory status, including the Garbage collector. See: http://msdn.microsoft.com/en-us/library/x2tyfybc.aspx for details


Use Perfview to collect and display GC Performance stats in nice way. It outputs nice tables and also Excel files.

0

精彩评论

暂无评论...
验证码 换一张
取 消