You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-07-30 09:43:10 +03:00
stat_user_tables: Add total size metric (#904)
Signed-off-by: David Cook <dcook@divviup.org>
This commit is contained in:
@ -71,7 +71,8 @@ func TestPGStatUserTablesCollector(t *testing.T) {
|
||||
"vacuum_count",
|
||||
"autovacuum_count",
|
||||
"analyze_count",
|
||||
"autoanalyze_count"}
|
||||
"autoanalyze_count",
|
||||
"total_size"}
|
||||
rows := sqlmock.NewRows(columns).
|
||||
AddRow("postgres",
|
||||
"public",
|
||||
@ -94,7 +95,8 @@ func TestPGStatUserTablesCollector(t *testing.T) {
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14)
|
||||
14,
|
||||
15)
|
||||
mock.ExpectQuery(sanitizeQuery(statUserTablesQuery)).WillReturnRows(rows)
|
||||
ch := make(chan prometheus.Metric)
|
||||
go func() {
|
||||
@ -170,7 +172,8 @@ func TestPGStatUserTablesCollectorNullValues(t *testing.T) {
|
||||
"vacuum_count",
|
||||
"autovacuum_count",
|
||||
"analyze_count",
|
||||
"autoanalyze_count"}
|
||||
"autoanalyze_count",
|
||||
"total_size"}
|
||||
rows := sqlmock.NewRows(columns).
|
||||
AddRow("postgres",
|
||||
nil,
|
||||
@ -193,6 +196,7 @@ func TestPGStatUserTablesCollectorNullValues(t *testing.T) {
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
nil)
|
||||
mock.ExpectQuery(sanitizeQuery(statUserTablesQuery)).WillReturnRows(rows)
|
||||
ch := make(chan prometheus.Metric)
|
||||
|
Reference in New Issue
Block a user