Skip to content

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

@sharkdp

Description

@sharkdp

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions