...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package snap
16
17 import "github.com/prometheus/client_golang/prometheus"
18
19 var (
20 snapMarshallingSec = prometheus.NewHistogram(prometheus.HistogramOpts{
21 Namespace: "etcd_debugging",
22 Subsystem: "snap",
23 Name: "save_marshalling_duration_seconds",
24 Help: "The marshalling cost distributions of save called by snapshot.",
25
26
27
28 Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
29 })
30
31 snapSaveSec = prometheus.NewHistogram(prometheus.HistogramOpts{
32 Namespace: "etcd_debugging",
33 Subsystem: "snap",
34 Name: "save_total_duration_seconds",
35 Help: "The total latency distributions of save called by snapshot.",
36
37
38
39 Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
40 })
41
42 snapFsyncSec = prometheus.NewHistogram(prometheus.HistogramOpts{
43 Namespace: "etcd",
44 Subsystem: "snap",
45 Name: "fsync_duration_seconds",
46 Help: "The latency distributions of fsync called by snap.",
47
48
49
50 Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
51 })
52
53 snapDBSaveSec = prometheus.NewHistogram(prometheus.HistogramOpts{
54 Namespace: "etcd",
55 Subsystem: "snap_db",
56 Name: "save_total_duration_seconds",
57 Help: "The total latency distributions of v3 snapshot save",
58
59
60
61 Buckets: prometheus.ExponentialBuckets(0.1, 2, 10),
62 })
63
64 snapDBFsyncSec = prometheus.NewHistogram(prometheus.HistogramOpts{
65 Namespace: "etcd",
66 Subsystem: "snap_db",
67 Name: "fsync_duration_seconds",
68 Help: "The latency distributions of fsyncing .snap.db file",
69
70
71
72 Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
73 })
74 )
75
76 func init() {
77 prometheus.MustRegister(snapMarshallingSec)
78 prometheus.MustRegister(snapSaveSec)
79 prometheus.MustRegister(snapFsyncSec)
80 prometheus.MustRegister(snapDBSaveSec)
81 prometheus.MustRegister(snapDBFsyncSec)
82 }
83
View as plain text