This is an automated email from the ASF dual-hosted git repository.

ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git


The following commit(s) were added to refs/heads/master by this push:
     new b30768fc [YUNIKORN-2915] Update scheduling latency metric even with no 
allocation (#980)
b30768fc is described below

commit b30768fcfe97b5fd17d5b960cbda860209b5eec8
Author: Craig Condit <[email protected]>
AuthorDate: Thu Oct 10 16:40:34 2024 -0600

    [YUNIKORN-2915] Update scheduling latency metric even with no allocation 
(#980)
    
    Closes: #980
    
    Signed-off-by: Craig Condit <[email protected]>
---
 pkg/scheduler/context.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/scheduler/context.go b/pkg/scheduler/context.go
index 9a22b41e..c2bec588 100644
--- a/pkg/scheduler/context.go
+++ b/pkg/scheduler/context.go
@@ -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())


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to