tokio-eld 0.2.0

Histogram-based sampler for recording and analyzing event loop delays
Documentation
  • Coverage
  • 75%
    6 out of 8 items documented1 out of 6 items with examples
  • Size
  • Source code size: 16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 22s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • littledivy

Crates.io

Documentation

tokio_eld provides a histogram-based sampler for recording and analyzing event loop delays in a current_thread Tokio runtime. The API is similar to Node.js's perf_hooks.monitorEventLoopDelay().

use tokio_eld::EldHistogram;

let mut histogram = EldHistogram::<u64>::new(20)?; // 20 ms resolution

h.start();
// do some work
h.stop();

println!("min: {}", h.min());
println!("max: {}", h.max());
println!("mean: {}", h.mean());
println!("stddev: {}", h.stdev());
println!("p50: {}", h.value_at_percentile(50.0));
println!("p90: {}", h.value_at_percentile(90.0));