{
  "slug": "hyperfine-metrics-selects-benchmark-metrics-and-units-9067d922796f",
  "title": "hyperfine --metrics selects benchmark metrics and units",
  "tools": [
    "hyperfine"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-07T21:13:36.000Z",
  "announced_at": "2026-10-07T21:13:36.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When comparing benchmark commands, use `--metrics` to choose measurements; hyperfine otherwise displays wall-clock time and peak resident memory. Hardware counters require running without a shell, and their availability varies by platform.",
    "examples": [
      "hyperfine --metrics memory_peak_resident:MiB,time_wall_clock:ms,instructions './baseline' './candidate'"
    ],
    "gotchas": [
      "Version: v2.0.0",
      "--metrics <metrics>: Comma-separated metrics; each may have an optional unit. The documented default is `time_wall_clock,memory_peak_resident`.",
      "time_wall_clock: Elapsed time including waiting; seconds by default. Supported units: `ns`, `us`, `ms`, `s`, `min`, `h`.",
      "memory_peak_resident: Peak physical RAM usage; bytes by default. Supported units: `B`, `kB`, `MB`, `GB`, `TB`, `KiB`, `MiB`, `GiB`, `TiB`. Unsupported on Windows.",
      "time_user, time_system, time_cpu: User CPU time, kernel CPU time, and their total; seconds by default. `time_cpu` is user plus system time.",
      "cpu_cycles, instructions: CPU cycles and completed instructions. Hardware-counter units: `count`, `k`, `M`, `B`. Unsupported on Windows.",
      "cache_references, cache_misses, branch_misses: Cache accesses, cache misses, and mispredicted branches. Linux only; hardware-counter units are `count`, `k`, `M`, `B`.",
      "--metrics=default | time | all: Preset for default metrics, time metrics, or all available metrics. Presets are alternatives to an explicit metric list; docs do not describe combining them.",
      "<command>... (required): One or more benchmark commands; each argument is an executable and its arguments.",
      "Prerequisite: Hyperfine must be installed. Hardware counters are unavailable when a shell is enabled (`--shell=...`). Counter support depends on platform; see metric-specific availability."
    ]
  },
  "why_it_matters": "Compare repository benchmark runs by wall-clock time, memory, or another supported performance metric.",
  "sources": [
    "https://github.com/sharkdp/hyperfine/releases/tag/v2.0.0",
    "https://github.com/sharkdp/hyperfine/blob/v2.0.0/README.md"
  ],
  "rank": 0.98029,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-228b6cde5f7e5eb2-0:gate",
    "evidence_hash": "e97e7ac8f2a74688489ab9335a1d33f37de316dc351233c75dd828fe560592bd"
  },
  "review": {
    "draft_hash": "f45a2c0b06d9003f353799cd2cb72cce09e0e6649ff9eec73ba95f1458e77027",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T21:13:36.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
