kaichiachen commented on code in PR #1017:
URL: https://github.com/apache/yunikorn-core/pull/1017#discussion_r2159394537
##########
pkg/metrics/scheduler.go:
##########
@@ -182,6 +207,10 @@ func (m *SchedulerMetrics) ObserveSchedulingLatency(start
time.Time) {
m.schedulingLatency.Observe(SinceInSeconds(start))
}
+func (m *SchedulerMetrics) ObserveSchedulingCycle(start time.Time) {
+ m.schedulingCycle.Observe(SinceInSeconds(start))
+}
Review Comment:
SinceInSeconds returns float64 type. If a scheduling cyle takes less than
1s. It won't have problem. Besides, we define bucket as
`prometheus.ExponentialBuckets(0.0001, 10, 8)`. This means the bucket will be
`[0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000]`, unit is seconds, which should
cover all cases. BTW, other metrics like `Scheduling Latency` also use
SinceInSeconds at line 206. This metric typically takes less time than
`Scheduling Cycle`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]