Compare commits

..
Author SHA1 Message Date
David Peter 4f62157cc9 Help text 2026-10-06 15:43:19 +02:00
David Peter 15108de79e CHANGELOG 2026-10-06 15:29:18 +02:00
David Peter 75d16c2239 More improvements 2026-10-06 15:19:54 +02:00
David Peter a947ba1d06 Simplifications 2026-10-06 15:09:25 +02:00
David Peter 1032204d7e README changes 2026-10-06 15:07:04 +02:00
David Peter 4f893b505e Simplifications 2026-10-06 13:34:03 +02:00
David Peter 715994847f Simplifications 2026-10-06 13:20:18 +02:00
David Peter 33edbaa784 Manpage 2026-10-06 13:06:39 +02:00
David Peter a027c1eb22 Updates 2026-10-06 12:54:39 +02:00
David Peter 55dfe6722c Better defaults 2026-10-06 12:53:42 +02:00
David Peter 908b33cc1d Add support for showing other metrics in the terminal 2026-10-06 12:53:42 +02:00
6 changed files with 14 additions and 24 deletions

No files matched your search

+1 -5
View File
@@ -222,8 +222,6 @@ jobs:
DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }}-musl DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }}-musl
case ${{ matrix.job.target }} in *-musl*) DPKG_BASENAME=${{ needs.crate_metadata.outputs.name }}-musl ; DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }} ;; esac; case ${{ matrix.job.target }} in *-musl*) DPKG_BASENAME=${{ needs.crate_metadata.outputs.name }}-musl ; DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }} ;; esac;
DPKG_VERSION=${{ needs.crate_metadata.outputs.version }} DPKG_VERSION=${{ needs.crate_metadata.outputs.version }}
# Debian prereleases must sort before the corresponding stable version.
DPKG_VERSION=${DPKG_VERSION/-/\~}
unset DPKG_ARCH unset DPKG_ARCH
case ${{ matrix.job.target }} in case ${{ matrix.job.target }} in
@@ -342,8 +340,6 @@ jobs:
uses: softprops/action-gh-release@v3 uses: softprops/action-gh-release@v3
if: steps.is-release.outputs.IS_RELEASE if: steps.is-release.outputs.IS_RELEASE
with: with:
prerelease: ${{ contains(needs.crate_metadata.outputs.version, '-') }}
make_latest: ${{ contains(needs.crate_metadata.outputs.version, '-') && 'false' || 'true' }}
files: | files: |
${{ steps.package.outputs.PKG_PATH }} ${{ steps.package.outputs.PKG_PATH }}
${{ steps.debian-package.outputs.DPKG_PATH }} ${{ steps.debian-package.outputs.DPKG_PATH }}
@@ -354,7 +350,7 @@ jobs:
name: Publish to Winget name: Publish to Winget
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') if: startsWith(github.ref, 'refs/tags/v')
steps: steps:
- uses: vedantmgoyal2009/winget-releaser@v2 - uses: vedantmgoyal2009/winget-releaser@v2
with: with:
+6 -10
View File
@@ -1,25 +1,21 @@
# v2.0.0-alpha.1 # Unreleased
This is the first alpha release of hyperfine 2.0. Command-line options and export formats may change before the stable release. See the breaking changes below when migrating from hyperfine 1.x.
## Features ## Features
- Add support for alternative performance metrics (peak memory usage, CPU cycles, instructions, cache misses, branch misses, ...). By default, hyperfine will now display wall-clock time and peak memory usage (wall-clock time only on Windows), - Add support for alternative performance metrics (peak memory usage, CPU cycles, instructions, cache misses, branch misses, ...). By default, hyperfine will now display wall-clock time and peak memory usage,
but users can use the new `--metrics` option to select different performance metrics. but users can use the new `--metrics` option to select different performance metrics.
- The terminal output now shows an overview of all selected performance metrics, including relative changes. - The terminal output now shows an overview of all measured performance metrics, including relative changes.
- Python plotting and analysis scripts support the new JSON format and can select performance metrics with `--metric`, see #981 and #984 (@sharkdp).
## Breaking changes ## Breaking changes
- Benchmarked commands are now executed directly by default, without an intermediate shell (`--shell=none`). Use `-S` (an alias for `--shell=default`) to restore the previous behavior (`sh` on Unix, `cmd.exe` on Windows), or select a shell with `--shell <SHELL>`. - Benchmarked commands are now always executed directly, without an intermediate shell (`--shell=none`). Use `-S` (an alias for `--shell=default`) to restore the previous behavior (`sh` on Unix, `cmd.exe` on Windows), or select a shell with `--shell <SHELL>`.
- The JSON format for `--export-json` has changed (schema version 2). The new format now includes metadata, per-run measurements, and statistical summaries for all measured quantities, see #790 (@sharkdp). Code that reads those exported JSON files must be updated. For example, `results[i].mean` is now `results[i].summary.time_wall_clock.mean`, and `results[i].times` is replaced by `results[i].measurements[j].time_wall_clock.value`. The new structure looks like this: - The JSON format for `--export-json` has changed (schema version 2). The new format now includes metadata, per-run measurements, and statistical summaries for all measured quantities, see #790 (@sharkdp). Code that reads those exported JSON files must be updated. For example, `results[i].mean` is now `results[i].summary.time_wall_clock.mean`, and `results[i].times` is replaced by `results[i].measurements[j].time_wall_clock.value`. The new structure looks like this:
```python ```python
{ {
"schema_version": 2, "schema_version": 2,
"primary_metric": "time_wall_clock",
"metadata": { "metadata": {
"hyperfine_version": "2.0.0-alpha.1", "hyperfine_version": "1.21.0",
"start_time": "2026-10-06T12:00:00Z", "start_time": "2026-10-06T12:00:00Z",
"platform": {"os": "Linux", "architecture": "x86_64"} "platform": {"os": "Linux", "architecture": "x86_64"}
}, },
@@ -59,7 +55,7 @@ This is the first alpha release of hyperfine 2.0. Command-line options and expor
- `--time-unit`/`-u` has been removed. Units can now be selected using the `--metrics METRIC[:UNIT],…` option, e.g. `--metrics time_wall_clock:ms,memory_peak_resident:MiB`. - `--time-unit`/`-u` has been removed. Units can now be selected using the `--metrics METRIC[:UNIT],…` option, e.g. `--metrics time_wall_clock:ms,memory_peak_resident:MiB`.
- `--sort` has been removed. It complicated hyperfine significantly and doesn't make too much sense with the new output format. - `--sort` has been removed. It complicated hyperfine significantly and doesn't make too much sense with the new output format.
- `--reference` and `--reference-name` have been removed (for now). The first command is always considered as the reference command. - `--reference` and `--reference-name` have been removed (for now). The first command is always considered as the reference command.
- The format of Markdown, AsciiDoc, org-mode and CSV exports has also been changed. These formats contain only the primary metric (the first metric selected by `--metrics`). CSV now includes columns with the name and the unit of the primary metric. - The format of Markdown, AsciiDoc, org-mode and CSV exports has also been changed. CSV now includes columns with the name and the unit of the primary metric.
# v1.21.0 # v1.21.0
+2 -2
View File
@@ -13,5 +13,5 @@ authors:
repository-code: 'https://github.com/sharkdp/hyperfine' repository-code: 'https://github.com/sharkdp/hyperfine'
abstract: A command-line benchmarking tool. abstract: A command-line benchmarking tool.
license: MIT license: MIT
version: 2.0.0-alpha.1 version: 1.21.0
date-released: '2026-10-06' date-released: '2026-10-05'
Generated
+1 -1
View File
@@ -377,7 +377,7 @@ checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15"
[[package]] [[package]]
name = "hyperfine" name = "hyperfine"
version = "2.0.0-alpha.1" version = "1.21.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"approx", "approx",
+1 -1
View File
@@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
name = "hyperfine" name = "hyperfine"
readme = "README.md" readme = "README.md"
repository = "https://github.com/sharkdp/hyperfine" repository = "https://github.com/sharkdp/hyperfine"
version = "2.0.0-alpha.1" version = "1.21.0"
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
rust-version = "1.97.0" rust-version = "1.97.0"
+3 -5
View File
@@ -189,9 +189,7 @@ The following metrics are available:
- Linux/macOS: Peak resident set size (RSS). This is the largest per-process peak among the - Linux/macOS: Peak resident set size (RSS). This is the largest per-process peak among the
command and child processes (whose usage is collected when their parents wait for them), command and child processes (whose usage is collected when their parents wait for them),
*not the simultaneous total memory of the full process tree*. On Linux, measuring commands *not the simultaneous total memory of the full process tree*.
with a very small peak RSS (below the peak inherited from hyperfine at startup, which can
be a few MiB) will currently result in that inherited value being reported instead.
- Windows: Currently not supported. - Windows: Currently not supported.
- **`cpu_cycles`**: CPU cycles consumed. - **`cpu_cycles`**: CPU cycles consumed.
@@ -220,7 +218,7 @@ The following metrics are available:
- Linux: Same scope as `cpu_cycles`. - Linux: Same scope as `cpu_cycles`.
- macOS/Windows: Currently not supported. - macOS/Windows: Currently not supported.
Note that hardware counters are not available when a shell is enabled (`--shell=..`). Note that hardware counters are not available if a `--shell` is used.
Time measurements support units `ns`, `us`, `ms`, `s`, `min`, and `h`. Memory measurements Time measurements support units `ns`, `us`, `ms`, `s`, `min`, and `h`. Memory measurements
support `B`, `kB`, `MB`, `GB`, `TB`, `KiB`, `MiB`, `GiB`, and `TiB`. Hardware counters support `B`, `kB`, `MB`, `GB`, `TB`, `KiB`, `MiB`, `GiB`, and `TiB`. Hardware counters
@@ -237,7 +235,7 @@ You can also use a preset to select a group of metrics:
### Exporting results ### Exporting results
Hyperfine can export results to CSV, JSON, Markdown, AsciiDoc, and org-mode. Non-JSON formats Hyperfine can export results to CSV, JSON, Markdown, AsciiDoc, and org-mode. Non-JSON formats
contain only the primary metric, which is the first metric selected by `--metrics`. contain only the primary metric.
#### Markdown #### Markdown