From 7cbac6bde0f0ac33567ea3df26d86cb63ac575d8 Mon Sep 17 00:00:00 2001 From: dntosas Date: Wed, 31 Mar 2021 20:23:24 +0300 Subject: [PATCH] [volumeScheduling/metrics] Fix buckets initialization This metrics is measured in seconds so it makes no sense starting from 1000 as init value. This breaks also the scheduler e2e metric thus make users unable to compute, for example, their SLO for the scheduler. Even if this metric is deprecated, it should behave correctly until it is completely removed to avoid user confusion. For example, for each volume created, the minimum value exposed as a metric is 16.6min (1000sec/60) which is obviously wrong as logic. In this commit, we migrate bucket creation to start from reasonable numbers, copying the incrementation from the conventions that the scheduler follows itself. Signed-off-by: dntosas --- .../framework/plugins/volumebinding/metrics/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/framework/plugins/volumebinding/metrics/metrics.go b/pkg/scheduler/framework/plugins/volumebinding/metrics/metrics.go index 1ad451bbfe2..02e80c130d2 100644 --- a/pkg/scheduler/framework/plugins/volumebinding/metrics/metrics.go +++ b/pkg/scheduler/framework/plugins/volumebinding/metrics/metrics.go @@ -41,7 +41,7 @@ var ( Subsystem: VolumeSchedulerSubsystem, Name: "scheduling_duration_seconds", Help: "Volume scheduling stage latency (Deprecated since 1.19.0)", - Buckets: metrics.ExponentialBuckets(1000, 2, 15), + Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, DeprecatedVersion: "1.19.0", },