diff --git a/cdc/owner/metrics.go b/cdc/owner/metrics.go index 97b7c43a46b..6ea7a084c75 100644 --- a/cdc/owner/metrics.go +++ b/cdc/owner/metrics.go @@ -159,6 +159,6 @@ func InitMetrics(registry *prometheus.Registry) { func lagBucket() []float64 { buckets := prometheus.LinearBuckets(0.5, 0.5, 20) buckets = append(buckets, prometheus.LinearBuckets(11, 1, 10)...) - buckets = append(buckets, prometheus.ExponentialBuckets(40, 2, 10)...) + buckets = append(buckets, prometheus.ExponentialBuckets(21, 2, 10)...) return buckets } diff --git a/cdc/owner/metrics_test.go b/cdc/owner/metrics_test.go index b927d3f7497..f45c669bbe7 100644 --- a/cdc/owner/metrics_test.go +++ b/cdc/owner/metrics_test.go @@ -23,5 +23,7 @@ func TestLagBucket(t *testing.T) { buckets := lagBucket() require.Equal(t, 40, len(buckets)) require.Equal(t, 0.5, buckets[0]) - require.Equal(t, float64(20480), buckets[39]) + require.Equal(t, 1.0, buckets[1]) + require.Equal(t, 21.0, buckets[30]) + require.Equal(t, float64(10752), buckets[39]) }