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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# latency-buckets

[![crates.io](https://img.shields.io/crates/v/latency-buckets.svg)](https://crates.io/crates/latency-buckets)

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

```rust
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.