mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
cleanup: remove isUnschedPodUpdateIncluded variable
This commit is contained in:
parent
4f853fceb9
commit
6624541893
@ -142,17 +142,12 @@ func (sched *Scheduler) updatePodInSchedulingQueue(oldObj, newObj interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
isUnschedPodUpdateIncluded := false
|
||||
defer metrics.EventHandlingLatency.WithLabelValues(framework.UnscheduledPodUpdate.Label).Observe(metrics.SinceInSeconds(start))
|
||||
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 evt.Label != framework.UnscheduledPodUpdate.Label {
|
||||
defer metrics.EventHandlingLatency.WithLabelValues(evt.Label).Observe(metrics.SinceInSeconds(start))
|
||||
}
|
||||
}
|
||||
if !isUnschedPodUpdateIncluded {
|
||||
// make sure we always record the latency with UnscheduledPodUpdate label.
|
||||
defer metrics.EventHandlingLatency.WithLabelValues(framework.UnscheduledPodUpdate.Label).Observe(metrics.SinceInSeconds(start))
|
||||
}
|
||||
|
||||
isAssumed, err := sched.Cache.IsAssumedPod(newPod)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user