← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

benchfmt.rs Brings Go's Benchmarking Workflow and benchstat Compatibility to Rust

🔄 Updated 2d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • benchfmt.rs is a Rust benchmark runner compatible with Go's benchstat.
  • Adds heap allocation tracking (B/op, allocs/op) and pprof profiling.
  • Includes a converter for Criterion and libtest to Go's benchfmt format.
  • Aims to improve Rust A/B microbenchmarking and Go vs. Rust comparisons.

Introducing benchfmt.rs

benchfmt.rs is a newly released zero-dependency Rust benchmark runner designed to integrate Rust benchmarking with Go's benchstat workflow. It provides a familiar interface for developers accustomed to Go's performance testing tools, addressing perceived gaps in Rust's standard benchmarking ecosystem.

Key Features and Capabilities

The tool introduces several features to Rust benchmarking, including key-value projections for case comparison, heap allocation measurements (bytes per operation and allocations per operation), and pprof profiling support. It also offers a simple reliability scoring mechanism. For those preferring existing Rust tools, benchfmt.rs includes a converter for Criterion and libtest outputs into Go's benchfmt format.

Motivation and Background

The developer, experienced in performance-sensitive Go projects like Prometheus and Thanos, noted that Rust's standard benchmarking tools lacked features common in the Go ecosystem, such as a standard format for comparisons, heap allocation metrics, and pprof support. The goal was to enable benchstat-compatible output for Rust microbenchmarks to facilitate A/B testing and Go vs. Rust performance comparisons.

Practical Application

To demonstrate its utility, the developer used benchfmt.rs to benchmark varint and Prometheus Remote Write 2.0 decoding across both Go and Rust implementations. This practical application showcases how the tool can be used to compare performance between the two languages and different Rust benchmarking frameworks.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

benchfmt.rs is a new zero-dependency Rust benchmark runner and Criterion converter that produces output compatible with Go's benchstat tool. It adds features like key-value projections, heap tracking for allocated bytes and objects, and pprof profiling to Rust benchmarking. This tool aims to simplify A/B microbenchmarking in Rust and enable direct comparisons with Go performance.