From df37c3e0d572ff3b4b4de3e9919402e8e0ccf971 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Fri, 14 Jul 2023 10:55:02 -0400 Subject: Parameterize Percentile in RPM Calculations Make the percentile used by RPM calculations user-controlled. Note: A percentile-based calculation is not part of the spec. This is an optional feature. Signed-off-by: Will Hawkins --- series/statistics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'series/statistics.go') diff --git a/series/statistics.go b/series/statistics.go index 2742aa7..96ec93b 100644 --- a/series/statistics.go +++ b/series/statistics.go @@ -18,7 +18,7 @@ func SeriesStandardDeviation[Data utilities.Number, Bucket constraints.Ordered]( return complete, utilities.CalculateStandardDeviation[Data](values) } -func Percentile[Data utilities.Number, Bucket constraints.Ordered](s WindowSeries[Data, Bucket], p int) (bool, Data) { +func Percentile[Data utilities.Number, Bucket constraints.Ordered](s WindowSeries[Data, Bucket], p uint) (bool, Data) { complete := s.Complete() inputValues := s.GetValues() -- cgit v1.2.3