google / google/benchmark

[FR] Add possibility for grouping benchmarks and disabling some groups

Open
#1,378 3 comments 6 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
10.4k
Forks
1.8k
Avg merge
2d 4h
Merged PRs (30d)
8

Description

Hello! We use Google benchmark to compare our library with others. And we often need to group benchmarks into categories (e.g. Lib1, Lib2, Lib3). This is convenient to disable some libraries or get json something like:
```
{
"Bench1": [{ Group1 results }, { Group2 results }, ... ]
}
```
It is also very convenient to run only some groups of benchmarks by the flag passed to cmake.
Example: `cmake -DGROUP1=ON, -DGROUP3=ON`

Now we do it with special macros and `EmptyBenchmark` class: https://github.com/YACLib/Bench/blob/master/util/bench.hpp#L50

But this is not very convenient, and I would like some more universal interface.
Are similar improvements planned in the future? Maybe you have some general advices on how to improve the organization of our benchmarks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.