Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I detect the moment garbage collection is run in .NET? [duplicate]

Possible Duplicate:
Monitoring Garbage Collector in C#

I'd like to know how often garbage collection is run in my C# application so that I can log the timestamps for later analysis.

Is there maybe some event or something similar that is fired before or after garbage collection so that I know when exactly garbage collection happened?

like image 972
sharptooth Avatar asked Nov 22 '12 08:11

sharptooth


1 Answers

Have a look at performance monitor (perfmon) and memory performance counters

like image 178
Maxim Zabolotskikh Avatar answered Sep 22 '22 18:09

Maxim Zabolotskikh