NVIDIA/nvbench
Add option to add plain text description to a benchmark declaration
Ouverte
#12 ouverte le 22 avr. 2021
P2: nice to havegood first issuetype: enhancement
Métriques du dépôt
- Stars
- (914 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
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.