0

I'm in the middle of writing my dissertation. I have created a search application using .net c#.

I need a way to accurately time the search.

I have heard of System.Diagnostics.Stopwatch but I have read that it wasn't accurate.

So my question is what is the most accurate way to time methods and how would you implement it?

  • Some helpful food for thought: http://stackoverflow.com/questions/394020/how-accurate-is-system-diagnostics-stopwatch – ryancdotnet Mar 24 '17 at 21:44
  • 1
    `System.Diagnostics.Stopwatch` is really rather accurate and the perfect tool for the job. Your measurements should cover many runs of the method. This will eliminate the limited precision of the measurement. – spender Mar 24 '17 at 21:45
  • https://www.codeproject.com/Articles/61964/Performance-Tests-Precise-Run-Time-Measurements-wi – DaniDev Mar 24 '17 at 21:51

0 Answers0