Skip to content

Commit d2af178

Browse files
committed
chore: revert temporary commented out code
1 parent 78cc1de commit d2af178

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

samples/BenchmarkDotNet.Samples/IntroVisualStudioDiagnoser.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)