perfgate-stats
Statistical functions for benchmarking analysis.
Part of the perfgate workspace.
Overview
Pure statistical functions with no I/O dependencies. Provides summary statistics, percentile calculation, and mean/variance computation for benchmark sample data.
Key API
summarize_u64(values)— compute median, min, max foru64samples →U64Summarysummarize_f64(values)— compute median, min, max forf64samples →F64Summarymedian_u64_sorted(sorted)— median of pre-sortedu64slice (overflow-safe)median_f64_sorted(sorted)— median of pre-sortedf64slicepercentile(values, q)— compute the q-th percentile (q ∈ [0, 1])mean_and_variance(values)— arithmetic mean and sample variance (Bessel-corrected)
Example
use ;
let summary = summarize_u64.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
let p95 = percentile.unwrap;
let = mean_and_variance.unwrap;
License
Licensed under either Apache-2.0 or MIT.