Skip to content

Commit

Permalink
[YUNIKORN-2915] Update scheduling latency metric even with no allocat…
Browse files Browse the repository at this point in the history
…ion (#980)

Closes: #980

Signed-off-by: Craig Condit <[email protected]>
  • Loading branch information
craigcondit committed Oct 10, 2024
1 parent b870b0c commit b30768f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func (cc *ClusterContext) schedule() bool {
result = psc.tryAllocate()
}
}
metrics.GetSchedulerMetrics().ObserveSchedulingLatency(schedulingStart)
if result != nil {
metrics.GetSchedulerMetrics().ObserveSchedulingLatency(schedulingStart)
if result.ResultType == objects.Replaced {
// communicate the removal to the RM
cc.notifyRMAllocationReleased(psc.RmID, psc.Name, []*objects.Allocation{result.Request.GetRelease()}, si.TerminationType_PLACEHOLDER_REPLACED, "replacing allocationKey: "+result.Request.GetAllocationKey())
Expand Down

0 comments on commit b30768f

Please sign in to comment.