
Performance isn't just about execution time—memory consumption matters just as much. Memory leaks, excessive allocations, and growing peak usage can silently degrade performance or cause unexpected behavior in production.
The new Memory Instrument automatically tracks memory allocations, deallocations, and peak consumption during every benchmark run, helping you identify memory bottlenecks before they become problems.
Every memory-instrumented benchmark run now includes comprehensive memory metrics that help you understand allocation behavior:

All metrics show comparison between baseline and current runs, with clear indicators of whether memory usage increased or decreased.
The timeline graph shows exactly how memory consumption changes throughout your benchmark:
The Memory Instrument helps you identify common memory problems:
We're continuing to expand memory analysis capabilities:
The Memory Instrument gives you the visibility you need to write memory-efficient code with confidence.
Simply configure your workflow to use the memory runner:
- uses: CodSpeedHQ/action@v4
with:
runner: memory # Enable memory instrumentation
Memory instrumentation is available on all runners now for Rust and C/C++ benchmarks, with more languages coming soon.
Learn more about the Memory Instrument.