mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
fix: calculate conservative SLO percentiles
This commit is contained in:
@@ -25,3 +25,9 @@ func TestEvaluateSLODoesNotInventFailureForEmptyOptionalWindows(t *testing.T) {
|
||||
t.Fatalf("empty window violations = %+v", violations)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPercentileUsesConservativeNearestRankForSmallWindows(t *testing.T) {
|
||||
if got := percentile([]time.Duration{time.Millisecond, 101 * time.Millisecond}, .95); got != 101*time.Millisecond {
|
||||
t.Fatalf("p95 underreported small window: %s", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user