Skip to content

Commit

Permalink
fix scheduler metric e2e_scheduling_latency_milliseconds
Browse files Browse the repository at this point in the history
Signed-off-by: wulixuan <[email protected]>
  • Loading branch information
wulixuan committed Jul 13, 2023
1 parent 5302995 commit 8a77643
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,16 @@ func (pc *Scheduler) runOnce() {
}

ssn := framework.OpenSession(pc.cache, plugins, configurations)
defer framework.CloseSession(ssn)
defer func() {
framework.CloseSession(ssn)
metrics.UpdateE2eDuration(metrics.Duration(scheduleStartTime))
}()

for _, action := range actions {
actionStartTime := time.Now()
action.Execute(ssn)
metrics.UpdateActionDuration(action.Name(), metrics.Duration(actionStartTime))
}
metrics.UpdateE2eDuration(metrics.Duration(scheduleStartTime))
}

func (pc *Scheduler) loadSchedulerConf() {
Expand Down

0 comments on commit 8a77643

Please sign in to comment.