Skip to content

Commit 6734294

Browse files
author
Adrien ZAGABE
committed
fix: callsMetric
1 parent 03faea5 commit 6734294

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

collector/pg_top_queries_execution.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ var (
5050
prometheus.Labels{},
5151
)
5252

53+
statExecutedCalls = prometheus.NewDesc(
54+
prometheus.BuildFQName(namespace, statTopQueriesExecutionTime, "calls"),
55+
"Number of times executed",
56+
[]string{"queryid"},
57+
prometheus.Labels{},
58+
)
59+
5360
statTopQueryExecutionQuery = `SELECT
5461
queryid,
5562
mean_time / 1000.0 as mean_time,
@@ -135,7 +142,7 @@ func (PGStatTopQueriesExecutionTime) Update(ctx context.Context, instance *insta
135142
}
136143

137144
ch <- prometheus.MustNewConstMetric(
138-
statTotalExecutionTime,
145+
statExecutedCalls,
139146
prometheus.CounterValue,
140147
callsMetric,
141148
queryIdLabel,

0 commit comments

Comments
 (0)