From 78d574a74665c8bc062c26755c80a8b524bce347 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Mon, 10 Jul 2023 13:45:50 -0400 Subject: [Feature] Major update: Track measurements that may be delayed Among other major feature additions, this version of the client tracks any measurements that may be long delayed and considers their presence or absence as part of a stability measurement. This version of the client also more closely tracks the spec. In particular, it performs a sinle-sided trimmed mean rather than a double-sided trimmed mean. Signed-off-by: Will Hawkins --- stabilizer/stabilizer.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'stabilizer/stabilizer.go') diff --git a/stabilizer/stabilizer.go b/stabilizer/stabilizer.go index b582751..b157ce1 100644 --- a/stabilizer/stabilizer.go +++ b/stabilizer/stabilizer.go @@ -14,7 +14,12 @@ package stabilizer -type Stabilizer[T any] interface { - AddMeasurement(T) +import ( + "golang.org/x/exp/constraints" +) + +type Stabilizer[Data any, Bucket constraints.Ordered] interface { + Interval() + AddMeasurement(Data, Bucket) IsStable() bool } -- cgit v1.2.3