Skip to content
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

Feature request: display times in milliseconds and microseconds #597

Open
MatthijsKok opened this issue Oct 26, 2024 · 3 comments
Open

Feature request: display times in milliseconds and microseconds #597

MatthijsKok opened this issue Oct 26, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@MatthijsKok
Copy link

Thank you for creating this tool! I use it a lot with great enjoyment.

When benchmarking some services that have consistently quick response times, it can get hard to visually parse the small fractions of seconds in the output.
It would be great if oha could support automatically or manually selecting the time unit for displaying the benchmark results.

This feature request is inspired by another amazing tool, hyperfine.
It automatically selects the appropriate time unit, based on the mean time of the benchmark result.
The --time-unit flag option can be used to manually set the time unit to be used.

// snippet from `hyperfine --help`

  -u, --time-unit <UNIT>
          Set the time unit to be used. Possible values: microsecond,
          millisecond, second. If the option is not given, the time unit is
          determined automatically. This option affects the standard output as
          well as all export formats except for CSV and JSON.

I'd love to hear if this is a feature you would like to have in your tool.

@hatoo
Copy link
Owner

hatoo commented Nov 6, 2024

Thanks for your issue!
I also want to change the number of output digits using the same option.

I'll work soon or later.

@hatoo hatoo added the enhancement New feature or request label Nov 6, 2024
@viveksb007
Copy link

@hatoo I can work on this if you haven't already started. Lmk thanks

@hatoo
Copy link
Owner

hatoo commented Nov 26, 2024

@viveksb007
Yeah, I haven't started it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants