|
|
@@ -22,7 +22,22 @@ var (
|
|
|
Subsystem: "disk",
|
|
|
Name: "backend_commit_duration_seconds",
|
|
|
Help: "The latency distributions of commit called by backend.",
|
|
|
- Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
|
|
|
+
|
|
|
+ // lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
|
|
|
+ // highest bucket start of 0.001 sec * 2^13 == 8.192 sec
|
|
|
+ Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
|
|
|
+ })
|
|
|
+
|
|
|
+ defragDurations = prometheus.NewHistogram(prometheus.HistogramOpts{
|
|
|
+ Namespace: "etcd",
|
|
|
+ Subsystem: "disk",
|
|
|
+ Name: "backend_defrag_duration_seconds",
|
|
|
+ Help: "The latency distribution of backend defragmentation.",
|
|
|
+
|
|
|
+ // 100 MB usually takes 1 sec, so start with 10 MB of 100 ms
|
|
|
+ // lowest bucket start of upper bound 0.1 sec (100 ms) with factor 2
|
|
|
+ // highest bucket start of 0.1 sec * 2^12 == 409.6 sec
|
|
|
+ Buckets: prometheus.ExponentialBuckets(.1, 2, 13),
|
|
|
})
|
|
|
|
|
|
snapshotDurations = prometheus.NewHistogram(prometheus.HistogramOpts{
|
|
|
@@ -30,12 +45,15 @@ var (
|
|
|
Subsystem: "disk",
|
|
|
Name: "backend_snapshot_duration_seconds",
|
|
|
Help: "The latency distribution of backend snapshots.",
|
|
|
- // 10 ms -> 655 seconds
|
|
|
+
|
|
|
+ // lowest bucket start of upper bound 0.01 sec (10 ms) with factor 2
|
|
|
+ // highest bucket start of 0.01 sec * 2^16 == 655.36 sec
|
|
|
Buckets: prometheus.ExponentialBuckets(.01, 2, 17),
|
|
|
})
|
|
|
)
|
|
|
|
|
|
func init() {
|
|
|
prometheus.MustRegister(commitDurations)
|
|
|
+ prometheus.MustRegister(defragDurations)
|
|
|
prometheus.MustRegister(snapshotDurations)
|
|
|
}
|