Ignore the error because its' same as nil sample
This commit is contained in:
parent
3440b100a1
commit
c9c8e0fb4e
@ -25,10 +25,10 @@ import (
|
|||||||
type statsSummaryContainerHandlerWrapper struct {
|
type statsSummaryContainerHandlerWrapper struct {
|
||||||
handler ContainerHandler
|
handler ContainerHandler
|
||||||
currentSummary *info.ContainerStatsPercentiles
|
currentSummary *info.ContainerStatsPercentiles
|
||||||
prevStats *info.ContainerStats
|
prevStats *info.ContainerStats
|
||||||
numStats uint64
|
numStats uint64
|
||||||
sampler sampling.Sampler
|
sampler sampling.Sampler
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *statsSummaryContainerHandlerWrapper) GetSpec() (*info.ContainerSpec, error) {
|
func (self *statsSummaryContainerHandlerWrapper) GetSpec() (*info.ContainerSpec, error) {
|
||||||
@ -72,8 +72,8 @@ func (self *statsSummaryContainerHandlerWrapper) GetStats() (*info.ContainerStat
|
|||||||
self.lock.Lock()
|
self.lock.Lock()
|
||||||
defer self.lock.Unlock()
|
defer self.lock.Unlock()
|
||||||
|
|
||||||
sample, err := info.NewSample(self.prevStats, stats)
|
sample, _ := info.NewSample(self.prevStats, stats)
|
||||||
if err == nil && sample != nil {
|
if sample != nil {
|
||||||
self.sampler.Update(sample)
|
self.sampler.Update(sample)
|
||||||
}
|
}
|
||||||
self.updatePrevStats(stats)
|
self.updatePrevStats(stats)
|
||||||
|
Loading…
Reference in New Issue
Block a user