peach_profiler

Crates.iopeach_profiler
lib.rspeach_profiler
version0.1.10
created_at2025-09-24 03:01:44.003657+00
updated_at2025-09-25 03:47:59.436056+00
descriptionA performant, low-overhead profiler. Just peachy.
homepage
repositoryhttps://github.com/Austionian/peach_profiler
max_upload_size
id1852415
size10,733
Austin Rooks (Austionian)

documentation

README

Peach Profiler 🍑 is a performant, low-overhead profiler. Just peachy.


Peach Profiler in action

use peach_profiler::{time_block, time_main, time_function};

// Add the `time_main` macro to the main function
#[time_main]
fn main() {
    let answer = {
        // Time a block
        time_block!("answer_block");

        fibonacci(22)
    };

    println!("{answer}");
}

// Time a function
#[time_function]
fn fibonacci(x: usize) -> usize {
    if x == 0 || x == 1 {
        return 1;
    }

    fibonacci(x - 1) + fibonacci(x - 2)
}

---------- Outputs ----------

28657

______________________________________________________
Total time: 1.7490ms (CPU freq 4300860492)
        answer_block[1]: 6665, (0.09%, 99.63% w/children)
        fibonacci[57313]: 7487891, (99.54%)
Commit count: 18

cargo fmt