Take snapshots after every 5 seconds

Questions about YourKit .NET Profiler
Post Reply
sandeep
Posts: 24
Joined: Wed May 16, 2012 3:08 pm

Take snapshots after every 5 seconds

Post by sandeep »

I need to get snapshots at regular intervals. Is there any way to clear the snapshot after I retrieve it using Controller.CaptureSnapshot Method in the API? Or do I have to call Controller.StopCPUProfiling Method and then start the CPU profiling again after every few seconds? Would that have any performance impact?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Take snapshots after every 5 seconds

Post by Anton Katilin »

I need to get snapshots at regular intervals. Is there any way to clear the snapshot after I retrieve it using Controller.CaptureSnapshot Method in the API? Or do I have to call Controller.StopCPUProfiling Method and then start the CPU profiling again after every few seconds?
Yes, you can use the API to stop profiling and then start it again.

Also, consider a dedicated feature:
http://www.yourkit.com/docs/net70/help/periodic.jsp
Would that have any performance impact?
http://www.yourkit.com/docs/net70/help/overhead.jsp
Post Reply