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 authored and WulixuanS committed Jul 27, 2023
1 parent a7f04a9 commit f46d924
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 f46d924

Please sign in to comment.