Skip to main content

Module embed_metrics

Module embed_metrics 

Source
Expand description

Lightweight observability for the embeddable KV store.

Tracks per-operation latency histograms (microseconds) and bytes moved. Percentile computation is on-demand via sort, fine for the sample sizes we hit on a single-engine warm path; for very high throughput an HDR/CKMS-style sketch would be more appropriate.

Structs§

EmbedMetrics
Aggregate metrics across all ops. Cheap to clone; intentionally process-global so the engine and any cli-stats utility look at the same registry.
OpSnapshot
Snapshot of one op’s stats. Cheap to clone.

Enums§

Op
Op tag for metric attribution. Cheap enum so the hot path doesn’t touch a string.

Functions§

metrics
Borrow the process-global metrics registry.