google / google/benchmark

Report base name in the json output without the settings like `/real_time` or `/iterations:100`

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

Description

I create benchmarks with some settings like:
```
auto benchmark_ptr = benchmark::RegisterBenchmark(custom_name, function, args);
benchmark_ptr->UseRealTime();
```

And the json output contains these two fields:
```
"name": "custom_name/real_time",
"run_name": "custom_name/real_time",
```

But I'm only interested in the `custom_name`, and the code using this json should be agnostic to these options, not parse the name (name that can contain slashes as well). The options might differ from one benchmark to another but the code using the results is the same.

So I think there should be either a field `base_name` that contains the exact name that I give to `RegisterBenchmark`, or a parameter to avoid appending information to the `name` or `run_name` field.

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.