Metrics for predicate and priority evaluation

This commit is contained in:
ravisantoshgudimetla
2018-01-09 10:42:07 +05:30
parent 2d2fa02337
commit 252ff1e5a6
2 changed files with 25 additions and 3 deletions

View File

@@ -25,8 +25,7 @@ import (
const schedulerSubsystem = "scheduler"
var BindingSaturationReportInterval = 1 * time.Second
// All the histogram based metrics have 1ms as size for the smallest bucket.
var (
E2eSchedulingLatency = prometheus.NewHistogram(
prometheus.HistogramOpts{
@@ -44,6 +43,22 @@ var (
Buckets: prometheus.ExponentialBuckets(1000, 2, 15),
},
)
SchedulingAlgorithmPredicateEvaluationDuration = prometheus.NewHistogram(
prometheus.HistogramOpts{
Subsystem: schedulerSubsystem,
Name: "scheduling_algorithm_predicate_evaluation",
Help: "Scheduling algorithm predicate evaluation duration",
Buckets: prometheus.ExponentialBuckets(1000, 2, 15),
},
)
SchedulingAlgorithmPriorityEvaluationDuration = prometheus.NewHistogram(
prometheus.HistogramOpts{
Subsystem: schedulerSubsystem,
Name: "scheduling_algorithm_priority_evaluation",
Help: "Scheduling algorithm priority evaluation duration",
Buckets: prometheus.ExponentialBuckets(1000, 2, 15),
},
)
BindingLatency = prometheus.NewHistogram(
prometheus.HistogramOpts{
Subsystem: schedulerSubsystem,
@@ -63,6 +78,8 @@ func Register() {
prometheus.MustRegister(E2eSchedulingLatency)
prometheus.MustRegister(SchedulingAlgorithmLatency)
prometheus.MustRegister(BindingLatency)
prometheus.MustRegister(SchedulingAlgorithmPredicateEvaluationDuration)
prometheus.MustRegister(SchedulingAlgorithmPriorityEvaluationDuration)
})
}