@@ -19,7 +19,7 @@ type metrics struct {
19
19
writesDelayedCount prometheus.Counter
20
20
// total amount of time (in ns) that writes that have been delayed due to
21
21
// compaction
22
- writesDelayedDuration prometheus.Counter
22
+ writesDelayedDuration prometheus.Gauge
23
23
// set to 1 if there is currently at least one write that is being delayed
24
24
// due to compaction
25
25
writeIsDelayed prometheus.Gauge
@@ -44,7 +44,7 @@ type metrics struct {
44
44
// size of each level
45
45
levelSize * prometheus.GaugeVec
46
46
// amount of time spent compacting each level
47
- levelDuration * prometheus.CounterVec
47
+ levelDuration * prometheus.GaugeVec
48
48
// amount of bytes read while compacting each level
49
49
levelReads * prometheus.CounterVec
50
50
// amount of bytes written while compacting each level
@@ -69,7 +69,7 @@ func newMetrics(namespace string, reg prometheus.Registerer) (metrics, error) {
69
69
Name : "writes_delayed" ,
70
70
Help : "number of cumulative writes that have been delayed due to compaction" ,
71
71
}),
72
- writesDelayedDuration : prometheus .NewCounter (prometheus.CounterOpts {
72
+ writesDelayedDuration : prometheus .NewGauge (prometheus.GaugeOpts {
73
73
Namespace : namespace ,
74
74
Name : "writes_delayed_duration" ,
75
75
Help : "amount of time (in ns) that writes have been delayed due to compaction" ,
@@ -129,8 +129,8 @@ func newMetrics(namespace string, reg prometheus.Registerer) (metrics, error) {
129
129
},
130
130
levelLabels ,
131
131
),
132
- levelDuration : prometheus .NewCounterVec (
133
- prometheus.CounterOpts {
132
+ levelDuration : prometheus .NewGaugeVec (
133
+ prometheus.GaugeOpts {
134
134
Namespace : namespace ,
135
135
Name : "duration" ,
136
136
Help : "amount of time (in ns) spent in compaction by level" ,
0 commit comments