This repository was archived by the owner on Nov 28, 2022. It is now read-only.
File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ type indexBloat struct {
253
253
}
254
254
255
255
// IndexBloat returns bloat percentage of an index reporting only for indexes
256
- // with size greater than 10mb and bloat lower than 50%
256
+ // with size greater than 10mb and bloat greater than 50%
257
257
func (g * Gauges ) IndexBloat () * prometheus.GaugeVec {
258
258
var gauge = prometheus .NewGaugeVec (
259
259
prometheus.GaugeOpts {
@@ -274,7 +274,7 @@ func (g *Gauges) IndexBloat() *prometheus.GaugeVec {
274
274
}).Set (idx .Pct )
275
275
}
276
276
}
277
- time .Sleep (g . interval )
277
+ time .Sleep (1 * time . Hour )
278
278
}
279
279
}()
280
280
return gauge
Original file line number Diff line number Diff line change @@ -130,11 +130,13 @@ type tableBloat struct {
130
130
Pct float64 `db:"pct_bloat"`
131
131
}
132
132
133
+ // TableBloat returns the bloat percentage of a table reporting only for tables
134
+ // with bloat percentange greater than 30% or greater than 1000mb
133
135
func (g * Gauges ) TableBloat () * prometheus.GaugeVec {
134
136
var gauge = prometheus .NewGaugeVec (
135
137
prometheus.GaugeOpts {
136
138
Name : "postgresql_table_bloat_pct" ,
137
- Help : "bloat percentage of an index . Reports only for tables with a lot of bloat" ,
139
+ Help : "bloat percentage of a table . Reports only for tables with a lot of bloat" ,
138
140
ConstLabels : g .labels ,
139
141
},
140
142
[]string {"table" },
@@ -149,7 +151,7 @@ func (g *Gauges) TableBloat() *prometheus.GaugeVec {
149
151
}).Set (table .Pct )
150
152
}
151
153
}
152
- time .Sleep (g . interval )
154
+ time .Sleep (1 * time . Hour )
153
155
}
154
156
}()
155
157
return gauge
You can’t perform that action at this time.
0 commit comments