mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
redundant equal compare
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
parent
2d6ee874a5
commit
ea9376a18b
@ -165,9 +165,6 @@ func (r *ResourceCollector) collectStats(oldStatsMap map[string]*cadvisorapiv2.C
|
||||
newStats := cStats.Stats[0]
|
||||
|
||||
if oldStats, ok := oldStatsMap[name]; ok && oldStats.Timestamp.Before(newStats.Timestamp) {
|
||||
if oldStats.Timestamp.Equal(newStats.Timestamp) {
|
||||
continue
|
||||
}
|
||||
r.buffers[name] = append(r.buffers[name], computeContainerResourceUsage(name, oldStats, newStats))
|
||||
}
|
||||
oldStatsMap[name] = newStats
|
||||
|
Loading…
Reference in New Issue
Block a user