mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
cleanup: remove isUnschedPodUpdateIncluded variable
This commit is contained in:
parent
4f853fceb9
commit
6624541893
@ -142,16 +142,11 @@ func (sched *Scheduler) updatePodInSchedulingQueue(oldObj, newObj interface{}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
isUnschedPodUpdateIncluded := false
|
|
||||||
for _, evt := range framework.PodSchedulingPropertiesChange(newPod, oldPod) {
|
|
||||||
defer metrics.EventHandlingLatency.WithLabelValues(evt.Label).Observe(metrics.SinceInSeconds(start))
|
|
||||||
if evt.Label == framework.UnscheduledPodUpdate.Label {
|
|
||||||
isUnschedPodUpdateIncluded = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !isUnschedPodUpdateIncluded {
|
|
||||||
// make sure we always record the latency with UnscheduledPodUpdate label.
|
|
||||||
defer metrics.EventHandlingLatency.WithLabelValues(framework.UnscheduledPodUpdate.Label).Observe(metrics.SinceInSeconds(start))
|
defer metrics.EventHandlingLatency.WithLabelValues(framework.UnscheduledPodUpdate.Label).Observe(metrics.SinceInSeconds(start))
|
||||||
|
for _, evt := range framework.PodSchedulingPropertiesChange(newPod, oldPod) {
|
||||||
|
if evt.Label != framework.UnscheduledPodUpdate.Label {
|
||||||
|
defer metrics.EventHandlingLatency.WithLabelValues(evt.Label).Observe(metrics.SinceInSeconds(start))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isAssumed, err := sched.Cache.IsAssumedPod(newPod)
|
isAssumed, err := sched.Cache.IsAssumedPod(newPod)
|
||||||
|
Loading…
Reference in New Issue
Block a user