Skip to content

Commit f44a741

Browse files
authored
docs: clarify overview runner for multiple files (#2973)
* docs: clarify overview runner for multiple files * docs: mention single-type runner option in overview * chore: retrigger CI
1 parent 6128fd6 commit f44a741

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/articles/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ namespace MyBenchmarks
5757
}
5858
```
5959

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`.
6163

6264
Note that BenchmarkDotNet will only run benchmarks if the application is built in the Release configuration.
6365
This is to prevent unoptimized code from being benchmarked.

0 commit comments

Comments
 (0)