MCPcopy
hub / github.com/google/cadvisor / updateLoadD

Method updateLoadD

lib/manager/container.go:432–438  ·  view source on GitHub ↗
(newLoad uint64)

Source from the content-addressed store, hash-verified

430}
431
432func (cd *containerData) updateLoadD(newLoad uint64) {
433 if cd.loadDAvg < 0 {
434 cd.loadDAvg = float64(newLoad) // initialize to the first seen sample for faster stabilization.
435 } else {
436 cd.loadDAvg = cd.loadDAvg*cd.loadDecay + float64(newLoad)*(1.0-cd.loadDecay)
437 }
438}
439
440func (cd *containerData) updateStats() error {
441 stats, statsErr := cd.handler.GetStats()

Callers 1

updateStatsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected