Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 6ab34ce

Browse files
Diogo Nicoletidiogonicoleti
Diogo Nicoleti
authored andcommitted
Fix bloat metrics
1 parent f94551d commit 6ab34ce

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: gauges/indexes.go

+1
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ func (g *Gauges) IndexBloat() *prometheus.GaugeVec {
265265
)
266266
go func() {
267267
for {
268+
gauge.Reset()
268269
var indexes []indexBloat
269270
if err := g.query(indexBloatQuery, &indexes, emptyParams); err == nil {
270271
for _, idx := range indexes {

Diff for: gauges/tables.go

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func (g *Gauges) TableBloat() *prometheus.GaugeVec {
143143
)
144144
go func() {
145145
for {
146+
gauge.Reset()
146147
var tables []tableBloat
147148
if err := g.query(tableBloatQuery, &tables, emptyParams); err == nil {
148149
for _, table := range tables {

0 commit comments

Comments
 (0)