Skip to main content

percentile

@retinue/monorepo


@retinue/monorepo / backend/src / percentile

Function: percentile()

percentile(sorted, fraction): number

Defined in: backend/src/loadtest/metrics.ts:36

Nearest-rank percentile on a sorted copy.

Nearest-rank rather than interpolated, because an interpolated p99 reports a latency nobody experienced. For a capacity envelope the honest question is "what did the slowest one percent actually see", and that has to be a real observation.

Parameters​

sorted​

readonly number[]

fraction​

number

Returns​

number