New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to choose the units used for CLI & results output #80
Comments
The markdown results exporter was using milliseconds, but the other results exporters are using the default seconds unit. * Change the markdown results exporter to also use the default seconds unit of `BenchmarkResult`. *This will change the markdown results for all users from milliseconds to seconds, a UX breaking change.* * Add unit tests for the markdown exporter to verify the output. Issue sharkdp#80 proposes a new option to choose the units used for both the CLI report and results export.
Thank you for the feedback! If this only affects the CLI and the Markdown export, this sounds good to me. I'd suggest |
That makes sense. I'll start work on this when I finish #71. |
The markdown results exporter was using milliseconds, but the other results exporters are using the default seconds unit. Apply some refactoring so the same logic used to select units for the CLI output can be used to select the units for the markdown exporter. Now the units of the markdown exporter match that of the CLI. When there are multiple benchmarks, the CLI will choose the appropriate unit for each benchmark separately. In this case, the markdown exporter will use the first benchmark to select the units for all the results. *This will change the markdown results for all users from milliseconds to seconds, a UX breaking change.* Add unit tests for the markdown exporter to verify the output. Issue sharkdp#80 proposes a new option to choose the units used for both the CLI report and results export.
The markdown results exporter was using milliseconds, but the other results exporters are using the default seconds unit. Apply some refactoring so the same logic used to select units for the CLI output can be used to select the units for the markdown exporter. Now the units of the markdown exporter match that of the CLI. When there are multiple benchmarks, the CLI will choose the appropriate unit for each benchmark separately. In this case, the markdown exporter will use the first benchmark to select the units for all the results. *This will change the markdown results for all users from milliseconds to seconds, a UX breaking change.* Add unit tests for the markdown exporter to verify the output. Issue sharkdp#80 proposes a new option to choose the units used for both the CLI report and results export.
The markdown results exporter was using milliseconds, but the other results exporters are using the default seconds unit. Apply some refactoring so the same logic used to select units for the CLI output can be used to select the units for the markdown exporter. Now the units of the markdown exporter match that of the CLI. When there are multiple benchmarks, the CLI will choose the appropriate unit for each benchmark separately. In this case, the markdown exporter will use the first benchmark to select the units for all the results. *This will change the markdown results for all users from milliseconds to seconds, a UX breaking change.* Add unit tests for the markdown exporter to verify the output. Issue sharkdp#80 proposes a new option to choose the units used for both the CLI report and results export.
I would also look forward to this, but instead of |
I'm okay with a short option. I just suggested
I typically add long command-line options to my programs because they have a self-documenting property which is great for usage in scripts. Short options are great for interactive use of often-used features, but I tend to also be hesitant when adding new short flags because the namespace is really small and there might be better uses for a flag in the future. For rarely-used features (like hyperfines |
The markdown results exporter was using milliseconds, but the other results exporters are using the default seconds unit. Apply some refactoring so the same logic used to select units for the CLI output can be used to select the units for the markdown exporter. Now the units of the markdown exporter match that of the CLI. When there are multiple benchmarks, the CLI will choose the appropriate unit for each benchmark separately. In this case, the markdown exporter will use the first benchmark to select the units for all the results. *This will change the markdown results for all users from milliseconds to seconds, a UX breaking change.* Add unit tests for the markdown exporter to verify the output. Issue sharkdp#80 proposes a new option to choose the units used for both the CLI report and results export.
The markdown results exporter was using milliseconds, but the other results exporters are using the default seconds unit. Apply some refactoring so the same logic used to select units for the CLI output can be used to select the units for the markdown exporter. Now the units of the markdown exporter match that of the CLI. When there are multiple benchmarks, the CLI will choose the appropriate unit for each benchmark separately. In this case, the markdown exporter will use the first benchmark to select the units for all the results. *This will change the markdown results for all users from milliseconds to seconds, a UX breaking change.* Add unit tests for the markdown exporter to verify the output. Issue #80 proposes a new option to choose the units used for both the CLI report and results export.
working on this now, will use the suggested |
Add option to set the time units to either `MilliSecond` or `Second` for both CLI output and Markdown export, overriding the default logic.
Add option to set the time units to either `MilliSecond` or `Second` for both CLI output and Markdown export, overriding the default logic.
Add option to set the time units to either `MilliSecond` or `Second` for both CLI output and Markdown export, overriding the default logic.
Add option to set the time units to either `MilliSecond` or `Second` for both CLI output and Markdown export, overriding the default logic.
PR submitted. |
Add option to set the time units to either `MilliSecond` or `Second` for both CLI output and Markdown export, overriding the default logic.
Released in v1.4.0. |
(a follow up to #71)
Currently the CLI automatically selects the units (seconds, milliseconds) based on the size of the
mean
value, but the results export is always in seconds.Choosing the units will force for the CLI and results export units to always match, and allow users to specify the units they are most familiar with/integrate with their reporting systems.
The option could be
-u --units <Seconds|Milliseconds>
, and maybe extended to also include minutes (and hours)?The units option value would be passed through to both
format::format_duration_units
for the CLI andExportManager::write_results
for the results export.The text was updated successfully, but these errors were encountered: