-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Compliant time units in CLI report and results export #71
Comments
Yes - we should definitely support this. Thank you for the feedback. |
I'll give this a try... It looks like This change should be just removing the But this doesn't fix the actual root cause of the issue - the results export may still differ in units from the CLI report because the CLI report will automatically adjust format between seconds and milliseconds if it's <1s while the results export is always seconds for all metrics. I'll submit a feature request to add an option to choose (force) the units for both the CLI & results, then they will always match, if desired. |
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.
CSV and JSON are formats to be automatically processed (where a hard-coded unit is the right choice, in my opinon), but Markdown is for humans.
I would prefer if we show the same unit that is also shown in the terminal (which is automatically inferred). |
Sure, can do. I'll update the PR with this support. |
I've updated the PR, but it's failing the some of the build checks b/c the older 1.24 version of Rust doesn't like my modern match statements :) I'm not sure how old of Rust you're supporting, let me know if you want me to make the changes to support 1.24 in addition to stable? |
Also, do you want the changes squashed? |
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've gone ahead and squashed the commits, and made the match statements satisfy Rust 1.24.0. |
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.
Fixed by @jasonpeacock in #84 |
Released in v1.4.0. |
When passing
--export-markdown
the resulted Markdown file includes information aboutMean
andMin..Max
measured inms
even when the original result report printed to stdout is presented in seconds. I think it might be better if the produced report would use the same units since it's hard to read very longms
numbers.Instructions for the behavior reproduction:
Command line output:
results.md:
sleep 5
The text was updated successfully, but these errors were encountered: