You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/articles/overview.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,9 @@ namespace MyBenchmarks
57
57
}
58
58
```
59
59
60
-
The `BenchmarkRunner.Run<Md5VsSha256>()` call runs your benchmarks and prints results to the console.
60
+
The `BenchmarkRunner.Run(typeof(Program).Assembly)` call runs all benchmarks in the current assembly and prints results to the console. If you'd like to run a single benchmark type, you can use `BenchmarkRunner.Run<Md5VsSha256>()`.
61
+
62
+
BenchmarkDotNet discovers benchmark types via reflection, so benchmarks can be placed in different files as long as they are in the same project/assembly and the benchmark classes are `public`.
61
63
62
64
Note that BenchmarkDotNet will only run benchmarks if the application is built in the Release configuration.
63
65
This is to prevent unoptimized code from being benchmarked.
0 commit comments