From 4ad1c0f9cb8aa54efa127975aaa9d5bd3080e8d0 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Thu, 3 Nov 2022 10:41:50 -0700 Subject: [PATCH] apiserver: remove redundant field from seatDemandStats --- .../k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go index aaea2af7a1d..b7fe6154934 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go +++ b/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go @@ -228,7 +228,6 @@ type seatDemandStats struct { avg float64 stdDev float64 highWatermark float64 - envelope float64 smoothed float64 } @@ -237,7 +236,6 @@ func newSeatDemandStats(val float64) seatDemandStats { avg: val, stdDev: 0, highWatermark: val, - envelope: val, smoothed: val, } } @@ -247,7 +245,6 @@ func (stats *seatDemandStats) update(obs fq.IntegratorResults) { stats.stdDev = obs.Deviation stats.highWatermark = obs.Max envelope := obs.Average + obs.Deviation - stats.envelope = envelope stats.smoothed = math.Max(envelope, seatDemandSmoothingCoefficient*stats.smoothed+(1-seatDemandSmoothingCoefficient)*envelope) }