Skip to content

Benchmark v0.5.7 - Backup

Pre-release
Pre-release

Choose a tag to compare

@jamesgober jamesgober released this 28 Aug 09:58
· 37 commits to main since this release

Version 0.5.7 - 2025-08-28

  • Internal, zero-dependency histogram replaces hdrhistogram for the metrics feature.
  • Lock-free hot path for recording; improved Watch::snapshot() internals.
  • Documentation refreshed; clippy/rustfmt clean; no breaking API changes.
  • TL;DR: Same API, faster internals, no extra deps.

Highlights

  • Zero-dependency metrics: internal high-performance histogram replaces hdrhistogram.
  • Lock-free hot path for recording metrics; improved snapshotting API.
  • Documentation refreshed across README and API to reflect new metrics internals.

Added

  • Changelog entry documenting histogram migration and zero-dependency metrics.

Changed

  • Metrics feature now uses built-in, zero-dependency histogram (src/histogram.rs) instead of hdrhistogram.
  • src/watch.rs: refactored to store Arc<Histogram> per metric; lock-free recording on the hot path; snapshot() moved to use internal API.
  • Cargo.toml: removed hdrhistogram dependency and references from features; updated description; all feature now includes metrics.
  • Documentation updates: README.md, docs/API.md, docs/features/METRICS.md now describe the internal histogram and production observability path.

Removed

  • External dependency on hdrhistogram from the metrics feature (metrics is now zero-dependency).

Compatibility

  • Public API for metrics is preserved: Watch, Timer, and stopwatch! continue to work as before.
  • No code changes required for consumers, unless relying on hdrhistogram-specific behavior. Internal implementation is now native.

Upgrade Guide

  • Update your dependency to:
    [dependencies]
    benchmark = "0.5.7"
  • If you disable default features and use metrics, enable metrics explicitly:
    [dependencies]
    benchmark = { version = "0.5.7", default-features = false, features = ["std", "metrics"] }
  • No migration actions are required for existing Watch/Timer/stopwatch! usage.

Quality & CI

  • Clippy: clean under #![deny(clippy::all)] across all features.
  • Rustfmt: formatted (CI enforces --check).
  • Tests: unit, async, and feature-gated perf tests validated locally.

Full Changelog: v0.5.0...v0.5.7