From ad0e162abc172993e12d8ad1256c3264429020f3 Mon Sep 17 00:00:00 2001 From: David Peter Date: Tue, 6 Oct 2026 15:55:32 +0200 Subject: [PATCH] Prepare release v2.0.0-alpha.1 --- .github/workflows/CICD.yml | 6 +++++- CHANGELOG.md | 16 ++++++++++------ CITATION.cff | 4 ++-- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index f5d75f5..977f741 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -222,6 +222,8 @@ jobs: 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; DPKG_VERSION=${{ needs.crate_metadata.outputs.version }} + # Debian prereleases must sort before the corresponding stable version. + DPKG_VERSION=${DPKG_VERSION/-/\~} unset DPKG_ARCH case ${{ matrix.job.target }} in @@ -340,6 +342,8 @@ jobs: uses: softprops/action-gh-release@v3 if: steps.is-release.outputs.IS_RELEASE with: + prerelease: ${{ contains(needs.crate_metadata.outputs.version, '-') }} + make_latest: ${{ contains(needs.crate_metadata.outputs.version, '-') && 'false' || 'true' }} files: | ${{ steps.package.outputs.PKG_PATH }} ${{ steps.debian-package.outputs.DPKG_PATH }} @@ -350,7 +354,7 @@ jobs: name: Publish to Winget runs-on: ubuntu-latest needs: build - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') steps: - uses: vedantmgoyal2009/winget-releaser@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b7389d..69bd528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,25 @@ -# Unreleased +# v2.0.0-alpha.1 + +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 -- 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, +- 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), but users can use the new `--metrics` option to select different performance metrics. -- The terminal output now shows an overview of all measured performance metrics, including relative changes. +- The terminal output now shows an overview of all selected 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 -- 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 `. +- 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 `. - 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 { "schema_version": 2, + "primary_metric": "time_wall_clock", "metadata": { - "hyperfine_version": "1.21.0", + "hyperfine_version": "2.0.0-alpha.1", "start_time": "2026-10-06T12:00:00Z", "platform": {"os": "Linux", "architecture": "x86_64"} }, @@ -55,7 +59,7 @@ - `--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. - `--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. 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. 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. # v1.21.0 diff --git a/CITATION.cff b/CITATION.cff index 3bccc3f..d38958e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -13,5 +13,5 @@ authors: repository-code: 'https://github.com/sharkdp/hyperfine' abstract: A command-line benchmarking tool. license: MIT -version: 1.21.0 -date-released: '2026-10-05' +version: 2.0.0-alpha.1 +date-released: '2026-10-06' diff --git a/Cargo.lock b/Cargo.lock index 3a54e84..db15b23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -377,7 +377,7 @@ checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" [[package]] name = "hyperfine" -version = "1.21.0" +version = "2.0.0-alpha.1" dependencies = [ "anyhow", "approx", diff --git a/Cargo.toml b/Cargo.toml index ac47bd5..9edc47f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" name = "hyperfine" readme = "README.md" repository = "https://github.com/sharkdp/hyperfine" -version = "1.21.0" +version = "2.0.0-alpha.1" edition = "2018" build = "build.rs" rust-version = "1.97.0" diff --git a/README.md b/README.md index 6b2535f..dafdf91 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ The following metrics are available: - Linux: Same scope as `cpu_cycles`. - macOS/Windows: Currently not supported. -Note that hardware counters are not available if a `--shell` is used. +Note that hardware counters are not available when a shell is enabled (`--shell=..`). 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 @@ -237,7 +237,7 @@ You can also use a preset to select a group of metrics: ### Exporting results Hyperfine can export results to CSV, JSON, Markdown, AsciiDoc, and org-mode. Non-JSON formats -contain only the primary metric. +contain only the primary metric, which is the first metric selected by `--metrics`. #### Markdown