What's the best way to benchmark programs in Windows?

后端 未结 6 1713
我寻月下人不归
我寻月下人不归 2020-12-09 06:54

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

6条回答
  •  心在旅途
    2020-12-09 07:25

    There are quite a few profilers out there. Here are some of the ones I know of:

    • Red Gate's ANTS
    • Yourkit's .Net Profiler
    • JetBrains dotTrace

    If you go on with using System.Diagnostics.Stopwatch, you will be able to instrument and measure only particular points of your code, where you explicitly put the Start/Stop around. This is good enough for measuring specific pieces, like a tight loop or things like that, but it's not going to give you a complete picture of where your program spends most of its time.

提交回复
热议问题