Skip to main content

Module tdigest

Module tdigest 

Source
Expand description

A t-digest, for the inspector’s percentiles (TDigest in packages/shared/src/tdigest.ts, itself a port of https://github.com/influxdata/tdigest, Apache License 2.0).

The port does the same arithmetic in the same order as JS, so a digest fed the same values gives JS’s quantiles exactly, and reads and writes the same JSON: [compression, mean, weight, mean, weight, ...], which is how zero-cache sends its metrics.

Structs§

TDigest
A digest of a distribution of numbers, for its quantiles: it keeps roughly compression centroids, and buffers up to eight times as many values between merges.