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.