Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FR] human readable name of benchmark #1006

Open
karthikeyann opened this issue Jul 21, 2020 · 0 comments · May be fixed by #1607
Open

[FR] human readable name of benchmark #1006

karthikeyann opened this issue Jul 21, 2020 · 0 comments · May be fixed by #1607

Comments

@karthikeyann
Copy link

https://github.com/google/benchmark#running-a-subset-of-benchmarks
As shown in the readme.md,
https://github.com/google/benchmark/blame/master/README.md#L424

The benchmark name contains the state.range values as human readable format. (eg. 32k)
But the current code does not provide any switches or automatic way to format these numbers to human readable format.

Benchmark              Time           CPU Iterations
----------------------------------------------------
BM_memcpy/32          11 ns         11 ns   79545455
BM_memcpy/32k       2181 ns       2185 ns     324074

Describe the solution you'd like
Provide a function to enable human readable names for benchmark names.
for powers of 2 and powers of 10.

DiegoKrupitza added a commit to DiegoKrupitza/google-benchmark that referenced this issue Jun 7, 2023
Allows used to add a command line flag called
`--benchmark_human_readable`. By adding this flag the arguments passed
to benchmarks are formated in a human friendly format. This means that
numbers that are the power of 2 are formatted as `2^x` (e.g., 64 will be
`2^6`). For numbers that are the power of 10 a different formatting
style is used. Numbers 0-999 no formatting is used. For numbers
1000-999999 the format `k` is used (e.g., `32000` -> `32k`). This also
works for millions and billions. For numbers greater than 999 billion no
special formatting is used.
The design is rather simple allowing to by easily extendable.

Closes: google#1006
@DiegoKrupitza DiegoKrupitza linked a pull request Jun 7, 2023 that will close this issue
DiegoKrupitza added a commit to DiegoKrupitza/google-benchmark that referenced this issue Jun 19, 2023
Allows used to add a command line flag called
`--benchmark_human_readable`. By adding this flag the arguments passed
to benchmarks are formatted in a human friendly format. This means that
numbers that are the power of 2 are formatted as `2^x` (e.g., 64 will be
`2^6`). For numbers that are the power of 10 a different formatting
style is used. Numbers 0-999 no formatting is used. For numbers
1000-999999 the format `k` is used (e.g., `32000` -> `32k`). This also
works for millions, billions, trillions, ... For numbers greater than
septillions no special formatting is used.
The design is rather simple allowing to by easily extendable.

Closes: google#1006
DiegoKrupitza added a commit to DiegoKrupitza/google-benchmark that referenced this issue Jun 20, 2023
Allows used to add a command line flag called
`--benchmark_human_readable`. By adding this flag the arguments passed
to benchmarks are formatted in a human friendly format. This means that
numbers that are the power of 2 are formatted as `2^x` (e.g., 64 will be
`2^6`). For numbers that are the power of 10 a different formatting
style is used. Numbers 0-999 no formatting is used. For numbers
1000-999999 the format `k` is used (e.g., `32000` -> `32k`). This also
works for millions, billions, trillions, ... For numbers greater than
septillions no special formatting is used.
The design is rather simple allowing to by easily extendable.

Closes: google#1006
DiegoKrupitza added a commit to DiegoKrupitza/google-benchmark that referenced this issue Jun 20, 2023
Allows used to add a command line flag called
`--benchmark_human_readable`. By adding this flag the arguments passed
to benchmarks are formatted in a human friendly format. This means that
numbers that are the power of 2 are formatted as `2^x` (e.g., 64 will be
`2^6`). For numbers that are the power of 10 a different formatting
style is used. Numbers 0-999 no formatting is used. For numbers
1000-999999 the format `k` is used (e.g., `32000` -> `32k`). This also
works for millions, billions, trillions, ... For numbers greater than
septillions no special formatting is used.
The design is rather simple allowing to by easily extendable.

Closes: google#1006
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants