summaryrefslogtreecommitdiff
path: root/series/statistics.go
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2023-07-14 10:55:02 -0400
committerWill Hawkins <[email protected]>2023-07-14 10:58:51 -0400
commitdf37c3e0d572ff3b4b4de3e9919402e8e0ccf971 (patch)
tree62e35137fa3d233f5506804775b6c71e728e71c3 /series/statistics.go
parent399eda676f7889accf72231c6696b89de7ea3fae (diff)
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 <[email protected]>
Diffstat (limited to 'series/statistics.go')
-rw-r--r--series/statistics.go2
1 files changed, 1 insertions, 1 deletions
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()