Skip to content

Commit

Permalink
Fix buckets initialization
Browse files Browse the repository at this point in the history
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 <ntosas@gmail.com>
  • Loading branch information
dntosas committed Aug 23, 2021
1 parent cb2ee55 commit 9b694f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/volume/scheduling/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down

0 comments on commit 9b694f1

Please sign in to comment.