mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #113598 from MikeSpreitzer/simplify-seat-demand-stats
apiserver: remove redundant field from seatDemandStats
This commit is contained in:
commit
63a7f6ba5d
@ -228,7 +228,6 @@ type seatDemandStats struct {
|
|||||||
avg float64
|
avg float64
|
||||||
stdDev float64
|
stdDev float64
|
||||||
highWatermark float64
|
highWatermark float64
|
||||||
envelope float64
|
|
||||||
smoothed float64
|
smoothed float64
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +236,6 @@ func newSeatDemandStats(val float64) seatDemandStats {
|
|||||||
avg: val,
|
avg: val,
|
||||||
stdDev: 0,
|
stdDev: 0,
|
||||||
highWatermark: val,
|
highWatermark: val,
|
||||||
envelope: val,
|
|
||||||
smoothed: val,
|
smoothed: val,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,7 +245,6 @@ func (stats *seatDemandStats) update(obs fq.IntegratorResults) {
|
|||||||
stats.stdDev = obs.Deviation
|
stats.stdDev = obs.Deviation
|
||||||
stats.highWatermark = obs.Max
|
stats.highWatermark = obs.Max
|
||||||
envelope := obs.Average + obs.Deviation
|
envelope := obs.Average + obs.Deviation
|
||||||
stats.envelope = envelope
|
|
||||||
stats.smoothed = math.Max(envelope, seatDemandSmoothingCoefficient*stats.smoothed+(1-seatDemandSmoothingCoefficient)*envelope)
|
stats.smoothed = math.Max(envelope, seatDemandSmoothingCoefficient*stats.smoothed+(1-seatDemandSmoothingCoefficient)*envelope)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user