#time-tracking #benchmark #performance-analysis #session #processor #hardware-aware

all_the_time

Processor time tracking utilities for benchmarks and performance analysis

22 unstable releases (3 breaking)

Uses new Rust 2024

new 0.4.15 Mar 26, 2026
0.4.13 Feb 26, 2026
0.4.8 Dec 29, 2025
0.4.5 Nov 15, 2025
0.4.3 Jul 27, 2025

#131 in Profiling


Used in par_bench

MIT license

89KB
1.5K SLoC

Processor time tracking utilities for benchmarks and performance analysis.

This package provides utilities to track processor time during code execution, enabling analysis of processor usage patterns in benchmarks and performance tests.

use all_the_time::Session;

fn main() {
    let session = Session::new();

    // Track multiple iterations efficiently
    {
        let operation = session.operation("my_operation");
        let iterations = 10;
        let _span = operation.measure_thread().iterations(iterations);
        
        for i in 0..iterations {
            let mut sum = 0;
            for j in 0..50000 {
                for k in 0..10 {
                    sum += (j * k * i) % 1000;
                    sum = sum.wrapping_mul(1103515245).wrapping_add(12345);
                }
            }
            std::hint::black_box(sum);
        }
    } // Total time measured once and divided by iteration count for mean

    session.print_to_stdout();
}

See also

More details in the package documentation.

This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.

Dependencies