File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
samples/BenchmarkDotNet.Samples Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,18 @@ namespace BenchmarkDotNet.Samples
66{
77 // Enables profiling with the CPU Usage tool
88 // See: https://learn.microsoft.com/visualstudio/profiling/profiling-with-benchmark-dotnet
9- //// [CPUUsageDiagnoser]
10- //// public class IntroVisualStudioProfiler
11- //// {
12- //// private readonly Random rand = new Random(42);
9+ [ CPUUsageDiagnoser ]
10+ public class IntroVisualStudioProfiler
11+ {
12+ private readonly Random rand = new Random ( 42 ) ;
1313
14- //// [Benchmark]
15- //// public void BurnCPU()
16- //// {
17- //// for (int i = 0; i < 100000; ++i)
18- //// {
19- //// rand.Next(1, 100);
20- //// }
21- //// }
22- //// }
14+ [ Benchmark ]
15+ public void BurnCPU ( )
16+ {
17+ for ( int i = 0 ; i < 100000 ; ++ i )
18+ {
19+ rand . Next ( 1 , 100 ) ;
20+ }
21+ }
22+ }
2323}
You can’t perform that action at this time.
0 commit comments