I feel like I'm missing something obvious, but, is there a way to name Google Benchmark argument values?
---------------- ----------
Benchmark Benchmark
---------------- ----------
NameTest/Alex instead of NameTest/0
NameTest/Bob NameTest/1
NameTest/Charles NameTest/2
for a benchmark defined something like this:
inline constexpr auto names = std::array{ "Alex", "Bob", "Charles" };
static void NameTest(benchmark::State& state)
{
const auto name = names[state.range(0)];
}
BENCHMARK(NameTest)->DenseRange(0, names.size() - 1);
you can call
SetLabel
on theState
object that is passed in.