Commit activity
Last 12 weeks · 182 commits
Community health
2 of 6 standards met
Recent PRs & issues
Problem During a long benchmark run, the ETA in the progress bar stayed frozen until the next run completed. With runs that take minutes or hours, the displayed estimate was effectively stale for the whole run (see #670). indicatif's estimator only records a sample when the position changes, so no new estimate is produced while a single step is in flight. Approach Add a small ETA estimator in that is registered as the template key: It keeps a rolling window of the durations of completed steps (same 16-sample window indicatif uses). While the current step is running, it subtracts the time already spent on that step, so the ETA decreases continuously (about once per second at the existing tick rate). It clamps at zero for overdue steps and falls back to the previous (indicatif) estimate before any step has completed. The template, spinner, message layout, quiet/export modes, and hidden non-TTY progress bars are unchanged. The estimator only runs when a bar is actually drawn. Tests (all unit and integration tests pass) Manually verified under a PTY that the ETA counts down during a long second run, and that piped/non-TTY runs still produce no progress output. Fixes #670 This change was prepared with AI assistance.
A persistent process handles many requests per Hyperfine run. Its overall wall time can hide a change in how long a user waits after the last keystroke. This example collects both measurements with the existing JSON export and iteration variable. In a search-client replay, changing how the client queued requests reduced p95 final-keystroke latency from 48.89 ms to 9.86 ms. Median whole-session time moved from 3.326 s to 3.248 s. All 144 final results matched independent searches. The observed gain belongs to the search client's queue policy. Verified the documented shell command and both Python snippets with Hyperfine 2.0.0. Six sessions produced 72 request samples. Recomputed both medians and both p95 values from the original client traces and checked session times against the Hyperfine exports.
For the Hyperfine 2.1 milestone. Large parameter sweeps with file-based JSON export serialize all completed benchmarks again after each command. A 512-command sweep therefore serializes 131,328 result entries. This adds an opt-in that writes 512 entries for the same sweep. Consumers can read each completed benchmark while the next one is running. Each line is a compact schema-v2 JSON document with a single result, with the same fields as the snapshot export. The writer flushes after each line. The existing snapshot exporter keeps its current behavior. Both formats can be requested together using separate paths. Measurements End-to-end release builds on Apple Silicon, compared with master at c516152. Six paired trials per sweep size, alternating which binary ran first. Each variant spawned a real process twice. Timings below cover the entire invocation through the final write to a regular file. Reproduce the larger workload with the baseline binary using the first command and the proposed binary using the second. This measures exporter overhead on short commands. In a four-variant Python top-k retrieval sweep (two runs per variant), both formats took about 0.46 s. With JSON Lines as the only exporter, the scheduler retains the first benchmark for comparisons and releases later measurements after flushing. In a real sweep of 128 commands with 64 process launches each, median peak RSS across three executions dropped from 8.00 to 6.86 MiB compared with the first JSON Lines commit. An isolated deterministic executor sweep (512 variants, 128 samples each) went from 11.47 to 2.72 MiB. Parameter expansion still allocates the command list up front. Verification 133 tests passed locally, including a regression test comparing both exports from the same run after a later command fails. The test checks that old contents are truncated and that completed records retain their order, measurements and statistical summaries. Release build, rustfmt and clippy also passed.
Recent fixes
The JSON export described the operating system and architecture in , but nothing about the hardware that produced the results, which made benchmarks from different machines hard to compare. Add the CPU model with its physical and logical core counts, the total amount of memory, and the size and free space of the disk that backs the working directory. Detection is best effort and platform specific, without new dependencies: procfs and statvfs on Linux, sysctl and statvfs on macOS, and the registry, GlobalMemoryStatusEx and GetDiskFreeSpaceExW on Windows. Every property is optional and is omitted when it cannot be determined, so an unknown platform or a restricted environment never fails an export and no property is ever reported as zero. The new fields are optional, so the JSON schema stays at version 2. The integration snapshots no longer show the contents of the block, because both its values and the set of detectable properties depend on the machine that runs the tests. The serialized shape is covered by unit tests in src/export/json/metadata.rs instead. Closes #711
Repository: sharkdp/hyperfine. Description: A command-line benchmarking tool Stars: 29289, Forks: 741. Primary language: Rust. Languages: Rust (93.3%), Python (6.7%). License: Apache-2.0. Topics: benchmark, cli, command-line, rust, terminal, tool. Latest release: v2.0.0 (1mo ago). Open PRs: 41, open issues: 39. Last activity: 2w ago. Community health: 42%. Top contributors: sharkdp, dependabot[bot], dependabot-preview[bot], dependabot-support, stevepentland, berombau, ZephyrDRH, ppaulweber, jasonpeacock, scampi and others.