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§
- Operation
Stats - Performance statistics for a profiled operation.
- Profile
Scope - 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.