I need to do some performance benchmarks on .NET programs (C#) in Windows, but I haven\'t done benchmarking much in the Windows world. I\'ve looked into using the Windows 2
using System.Diagnostics;
....
Stopwatch sw = new Stopwatch();
sw.Start();
// Code you want to time...
// Note: for averaged accuracy (without other OS effects),
// run timed code multiple times in a loop
// and then divide by the number of runs.
sw.Stop();
Console.WriteLine("Took " + sw.ElapsedTicks + " Ticks");