Module profiler

Module profiler 

Source
Expand description

Performance profiling utilities for CHIE Protocol.

This module provides lightweight profiling tools to track operation timings, identify bottlenecks, and generate performance reports.

§Examples

use chie_core::profiler::{Profiler, ProfileScope};
use std::time::Duration;

let mut profiler = Profiler::new();

// Profile a code section
{
    let _scope = profiler.scope("chunk_encryption");
    // ... encryption work ...
    std::thread::sleep(Duration::from_millis(10));
}

// Get statistics
let report = profiler.generate_report();
println!("{}", report);

Structs§

OperationStats
Performance statistics for a profiled operation.
ProfileScope
RAII guard for profiling a scope.
Profiler
Performance profiler for tracking operation timings.

Functions§

global_profiler
Get a reference to the global profiler.
init_global_profiler
Initialize the global profiler.