google / benchmark

A microbenchmark support library
Apache License 2.0
8.94k stars 1.62k forks source link

[FR] Provide current benchmark information #1677

Open SunBlack opened 11 months ago

SunBlack commented 11 months ago

Is your feature request related to a problem? Please describe. Currently at GoogleTest we use the name of the test to create a unique folder per test where the tests should write (so that the folder names are unique, but also easy to find when debugging for example). So we are using the data provided by testing::UnitTest::GetInstance()->current_test_info() in a helper class. Sadly, there is nothing similar in the Benchmark library.

Describe the solution you'd like Provide a way to retrieve information about the current running benchmark - similar to TestParamInfo of GoogleTest.