@@ -22,20 +22,38 @@ var (
22
22
Subsystem : "disk" ,
23
23
Name : "backend_commit_duration_seconds" ,
24
24
Help : "The latency distributions of commit called by backend." ,
25
- Buckets : prometheus .ExponentialBuckets (0.001 , 2 , 14 ),
25
+
26
+ // lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
27
+ // highest bucket start of 0.001 sec * 2^13 == 8.192 sec
28
+ Buckets : prometheus .ExponentialBuckets (0.001 , 2 , 14 ),
29
+ })
30
+
31
+ defragDurations = prometheus .NewHistogram (prometheus.HistogramOpts {
32
+ Namespace : "etcd" ,
33
+ Subsystem : "disk" ,
34
+ Name : "backend_defrag_duration_seconds" ,
35
+ Help : "The latency distribution of backend defragmentation." ,
36
+
37
+ // 100 MB usually takes 1 sec, so start with 10 MB of 100 ms
38
+ // lowest bucket start of upper bound 0.1 sec (100 ms) with factor 2
39
+ // highest bucket start of 0.1 sec * 2^12 == 409.6 sec
40
+ Buckets : prometheus .ExponentialBuckets (.1 , 2 , 13 ),
26
41
})
27
42
28
43
snapshotDurations = prometheus .NewHistogram (prometheus.HistogramOpts {
29
44
Namespace : "etcd" ,
30
45
Subsystem : "disk" ,
31
46
Name : "backend_snapshot_duration_seconds" ,
32
47
Help : "The latency distribution of backend snapshots." ,
33
- // 10 ms -> 655 seconds
48
+
49
+ // lowest bucket start of upper bound 0.01 sec (10 ms) with factor 2
50
+ // highest bucket start of 0.01 sec * 2^16 == 655.36 sec
34
51
Buckets : prometheus .ExponentialBuckets (.01 , 2 , 17 ),
35
52
})
36
53
)
37
54
38
55
func init () {
39
56
prometheus .MustRegister (commitDurations )
57
+ prometheus .MustRegister (defragDurations )
40
58
prometheus .MustRegister (snapshotDurations )
41
59
}
0 commit comments