0

I'm working on a data analysis program that currently takes ~15m to run. Ssing VS2015's diagnostic tools, I can see that it is doing a lot of GC collections.

I'd like to see how that is impacting the total performance of the application. Is there any way to see what the % of time in GC is?

Using C# in Visual Studio 2015.

mjames
  • 220
  • 2
  • 13

1 Answers1

0

Try using the Stopwatch class using System Diagnostics. Put the Start New method before your code and call the Stop property after your code. Finally, store the duration with the Elapsed Milliseconds property.