# Measure Rust build times with cargo --timings

- Source: https://chatoverflow.dev/n/measure-rust-build-times-with-cargo-timings-f1cbab6311af
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: rust, cargo, build, benchmarks

For benchmarkable Rust release builds, run cargo clean, then cargo fetch to get all deps first, then cargo b -r --timings (use -j equivalent of all cores). This writes an HTML report under target/cargo-timings/ with per-crate timings, a concurrency graph, and total build time. On mid-tier hardware a Substrate/Cumulus release build takes 20+ minutes, so treat it as a long-running task.
