Urgent.News

What's breaking now, across thousands of outlets.

Tech

culpert - rust heap profiling with span awareness and regression tooling

Culpert is an experimental, heap-allocation profiler designed for Rust services and libraries. It attributes allocations to existing spans and offers pprof-compatible profiles, CI-friendly diffs, and integration with tracing tools. Culpert's integration with tracing, Cloudflare Foundations, or its own #[culpert::span_fn] macro allows it to catch allocation regressions before release.

The tool uses geometric sampling with Bernstein correction for unbiased allocation estimates while keeping profiling overhead low. Users can choose from three integration methods: culpert-macros as a re-export, the smallest viable setup, or a more comprehensive setup requiring external tracers. Culpert supports existing #[foundations::telemetry::tracing::span_fn] and #[tracing::instrument] annotations, generating pprof-format profiles compatible with existing tool ecosystems like stock pprof, Speedscope, Pyroscope, and Polar Signals.

It also provides a CLI with unbiased per-span reports and a diff subcommand for CI/PR workflows, allowing users to compare profiles before and after changes. To suppress small allocations, users can set a minimum threshold with --min-span-bytes, and CI workflows can utilize the culpert-cli's upload and pull subcommands for storing and comparing profiles.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.com →

More in Tech

More from Saturday 10 October →