Motivation
For latency-sensitive systems (HFT, game engines), the mean and standard deviation are often misleading. A system with avg=500ns but p99=50µs is unacceptable. Percentiles are the standard lens for latency analysis and are the first thing practitioners look at when comparing against raw chrono measurements.
Current State
DumpToStream() currently reports: count, average, median, std dev, skewness, min, max, range, outlier count.
There is no percentile output.
Proposed Change
Add a percentile row (or additional columns) to the telemetry table:
[ p50 ] [ p95 ] [ p99 ] [ p999 ]
480 ns 620 ns 1.2 µs 8.4 µs
Since DumpToStream already sorts the sample array for median computation, percentiles are free — just index into the sorted vector at the right rank.
// After sort:
double p99 = sorted[(size_t)(0.99 * sorted.size())];
Acceptance Criteria
Motivation
For latency-sensitive systems (HFT, game engines), the mean and standard deviation are often misleading. A system with avg=500ns but p99=50µs is unacceptable. Percentiles are the standard lens for latency analysis and are the first thing practitioners look at when comparing against raw
chronomeasurements.Current State
DumpToStream()currently reports: count, average, median, std dev, skewness, min, max, range, outlier count.There is no percentile output.
Proposed Change
Add a percentile row (or additional columns) to the telemetry table:
Since
DumpToStreamalready sorts the sample array for median computation, percentiles are free — just index into the sorted vector at the right rank.Acceptance Criteria
Parameter::Cycle/Parameter::Timeunit