NVIDIA/nvbench
Add option to add plain text description to a benchmark declaration
Offen
#12 geöffnet am 22.04.2021
P2: nice to havegood first issuetype: enhancement
Repository-Metriken
- Stars
- (914 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
One of my favorite things about Catch2 is that you can provide a plain text, human readable description with each test.
TEST_CASE( "Factorials are computed", "[factorial]" ) {
REQUIRE( Factorial(1) == 1 );
REQUIRE( Factorial(2) == 2 );
REQUIRE( Factorial(3) == 6 );
REQUIRE( Factorial(10) == 3628800 );
}
It would be nice to extend this idea to benchmark declaration.
Taking from the example project, this could look something like:
NVBENCH_BENCH("Benchmarks sleep across a range of values", sleep_benchmark)
.add_int64_axis("Duration (us)", nvbench::range(0, 100, 5))
.set_timeout(1); // Limit to one second per measurement.
or it could be an additional member to the builder:
NVBENCH_BENCH(sleep_benchmark)
.add_int64_axis("Duration (us)", nvbench::range(0, 100, 5))
.set_timeout(1) // Limit to one second per measurement.
.description("Benchmarks sleep across a range of values");
This description could then be included when doing things like --list.