tags:

views:

30

answers:

2

Hello,
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

+1  A: 

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.

SLaks
+1, Lots of other great stuff in there too.
Josh Einstein
+1  A: 

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

Manu
thanks. This link did help as well.
Bharath K