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

User and system time should be in consistent time units #408

Closed
sharkdp opened this issue Jul 7, 2021 · 1 comment · Fixed by #409 or sthagen/sharkdp-hyperfine#18
Closed

User and system time should be in consistent time units #408

sharkdp opened this issue Jul 7, 2021 · 1 comment · Fixed by #409 or sthagen/sharkdp-hyperfine#18
Labels
bug good first issue Good for newcomers

Comments

@sharkdp
Copy link
Owner

sharkdp commented Jul 7, 2021

The "user" and "system" time should be reported in the same unit as mean, stddev, min and max. They should also follow --time-unit, if specified.

Example 1:

▶ hyperfine --runs 2 'stress --cpu 1 --timeout 1'
Benchmark 1: stress --cpu 1 --timeout 1
  Time (mean ± σ):      1.002 s ±  0.002 s    [User: 993.7 ms, System: 1.0 ms]
  Range (min … max):    1.000 s …  1.003 s    2 runs

Example 2:

▶ hyperfine --runs 2 'stress --cpu 1 --timeout 2' --time-unit millisecond
Benchmark 1: stress --cpu 1 --timeout 2
  Time (mean ± σ):     2000.4 ms ±   0.5 ms    [User: 1.983 s, System: 0.003 s]
  Range (min … max):   2000.0 ms … 2000.8 ms    2 runs
@sharkdp sharkdp added bug good first issue Good for newcomers labels Jul 7, 2021
@sharkdp sharkdp changed the title User and system time should be reported in consistens time unit User and system time should be reported in consistent time units Jul 7, 2021
@sharkdp sharkdp changed the title User and system time should be reported in consistent time units User and system time should be in consistent time units Jul 7, 2021
film42 added a commit to film42/hyperfine that referenced this issue Jul 12, 2021
The stddev/mean/max/min time unit gives precedence to the `--time-unit`
command line flag, and falls back to parsing. This changes the user and
system time to follow the same time unit as the rest of the report.

Closes sharkdp#408
film42 added a commit to film42/hyperfine that referenced this issue Jul 12, 2021
The stddev/mean/max/min time unit gives precedence to the `--time-unit`
command line flag and falls back to parsing. This changes the user and
system time to follow the same time unit as the rest of the report.

Closes sharkdp#408
sharkdp pushed a commit that referenced this issue Jul 26, 2021
The stddev/mean/max/min time unit gives precedence to the `--time-unit`
command line flag and falls back to parsing. This changes the user and
system time to follow the same time unit as the rest of the report.

Closes #408
@sharkdp
Copy link
Owner Author

sharkdp commented Oct 17, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
1 participant