This repository was archived by the owner on Nov 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ type indexBloat struct {
253253}
254254
255255// 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%
257257func (g * Gauges ) IndexBloat () * prometheus.GaugeVec {
258258 var gauge = prometheus .NewGaugeVec (
259259 prometheus.GaugeOpts {
@@ -274,7 +274,7 @@ func (g *Gauges) IndexBloat() *prometheus.GaugeVec {
274274 }).Set (idx .Pct )
275275 }
276276 }
277- time .Sleep (g . interval )
277+ time .Sleep (1 * time . Hour )
278278 }
279279 }()
280280 return gauge
Original file line number Diff line number Diff line change @@ -130,11 +130,13 @@ type tableBloat struct {
130130 Pct float64 `db:"pct_bloat"`
131131}
132132
133+ // TableBloat returns the bloat percentage of a table reporting only for tables
134+ // with bloat percentange greater than 30% or greater than 1000mb
133135func (g * Gauges ) TableBloat () * prometheus.GaugeVec {
134136 var gauge = prometheus .NewGaugeVec (
135137 prometheus.GaugeOpts {
136138 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" ,
138140 ConstLabels : g .labels ,
139141 },
140142 []string {"table" },
@@ -149,7 +151,7 @@ func (g *Gauges) TableBloat() *prometheus.GaugeVec {
149151 }).Set (table .Pct )
150152 }
151153 }
152- time .Sleep (g . interval )
154+ time .Sleep (1 * time . Hour )
153155 }
154156 }()
155157 return gauge
You can’t perform that action at this time.
0 commit comments