latency-buckets 0.1.0

Streaming histogram + percentile estimator for LLM call latencies. Fixed log-scale buckets, O(1) record, p50/p90/p95/p99 in microseconds. Zero deps.
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented1 out of 6 items with examples
  • Size
  • Source code size: 19.34 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 306.52 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/latency-buckets
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

latency-buckets

crates.io

Streaming histogram + percentile estimator for LLM call latencies. 30 log-scale buckets, O(1) record, p50/p90/p95/p99 in microseconds.

use latency_buckets::Histogram;
use std::time::Duration;
let mut h = Histogram::new();
h.record(Duration::from_millis(100));
let p95 = h.percentile(0.95);

Zero deps. MIT or Apache-2.0.