mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-06 16:15:35 +00:00
Update cadvisor and hcsshim versions
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
14
vendor/github.com/google/cadvisor/manager/container.go
generated
vendored
14
vendor/github.com/google/cadvisor/manager/container.go
generated
vendored
@@ -73,6 +73,7 @@ type containerData struct {
|
||||
loadReader cpuload.CpuLoadReader
|
||||
summaryReader *summary.StatsSummary
|
||||
loadAvg float64 // smoothed load average seen so far.
|
||||
loadDAvg float64 // smoothed load.d average seen so far.
|
||||
housekeepingInterval time.Duration
|
||||
maxHousekeepingInterval time.Duration
|
||||
allowDynamicHousekeeping bool
|
||||
@@ -441,6 +442,7 @@ func newContainerData(containerName string, memoryCache *memory.InMemoryCache, h
|
||||
allowDynamicHousekeeping: allowDynamicHousekeeping,
|
||||
logUsage: logUsage,
|
||||
loadAvg: -1.0, // negative value indicates uninitialized.
|
||||
loadDAvg: -1.0, // negative value indicates uninitialized.
|
||||
stop: make(chan struct{}),
|
||||
collectorManager: collectorManager,
|
||||
onDemandChan: make(chan chan struct{}, 100),
|
||||
@@ -633,6 +635,14 @@ func (cd *containerData) updateLoad(newLoad uint64) {
|
||||
}
|
||||
}
|
||||
|
||||
func (cd *containerData) updateLoadD(newLoad uint64) {
|
||||
if cd.loadDAvg < 0 {
|
||||
cd.loadDAvg = float64(newLoad) // initialize to the first seen sample for faster stabilization.
|
||||
} else {
|
||||
cd.loadDAvg = cd.loadDAvg*cd.loadDecay + float64(newLoad)*(1.0-cd.loadDecay)
|
||||
}
|
||||
}
|
||||
|
||||
func (cd *containerData) updateStats() error {
|
||||
stats, statsErr := cd.handler.GetStats()
|
||||
if statsErr != nil {
|
||||
@@ -659,6 +669,10 @@ func (cd *containerData) updateStats() error {
|
||||
cd.updateLoad(loadStats.NrRunning)
|
||||
// convert to 'milliLoad' to avoid floats and preserve precision.
|
||||
stats.Cpu.LoadAverage = int32(cd.loadAvg * 1000)
|
||||
|
||||
cd.updateLoadD(loadStats.NrUninterruptible)
|
||||
// convert to 'milliLoad' to avoid floats and preserve precision.
|
||||
stats.Cpu.LoadDAverage = int32(cd.loadDAvg * 1000)
|
||||
}
|
||||
}
|
||||
if cd.summaryReader != nil {
|
||||
|
||||
Reference in New Issue
Block a user