Created
September 28, 2022 02:48
-
-
Save poychang/0719af7496fc3868877b9dccbbd033fa to your computer and use it in GitHub Desktop.
[LINQPad - Benchmark 效能測試樣板] 簡單驗證執行效能
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
BenchmarkRunner.Run<BenchmarkJob>(); | |
[SimpleJob(RunStrategy.ColdStart, targetCount: 10)] | |
[MemoryDiagnoser] | |
public class BenchmarkJob | |
{ | |
[Benchmark] | |
public void Method1() | |
{ | |
Thread.Sleep(100); | |
} | |
[Benchmark] | |
public void Method2() | |
{ | |
Thread.Sleep(200); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment