mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 01:16:30 +00:00
Minor fix for some stats (#97)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
|
.idea
|
||||||
/target
|
/target
|
||||||
*.deb
|
*.deb
|
||||||
|
|||||||
21
src/stats.rs
21
src/stats.rs
@@ -292,17 +292,18 @@ impl Collector {
|
|||||||
|
|
||||||
let stats_template = HashMap::from([
|
let stats_template = HashMap::from([
|
||||||
("total_query_count", 0),
|
("total_query_count", 0),
|
||||||
("total_xact_count", 0),
|
|
||||||
("total_sent", 0),
|
|
||||||
("total_received", 0),
|
|
||||||
("total_xact_time", 0),
|
|
||||||
("total_query_time", 0),
|
("total_query_time", 0),
|
||||||
|
("total_received", 0),
|
||||||
|
("total_sent", 0),
|
||||||
|
("total_xact_count", 0),
|
||||||
|
("total_xact_time", 0),
|
||||||
("total_wait_time", 0),
|
("total_wait_time", 0),
|
||||||
("avg_xact_time", 0),
|
("avg_query_count", 0),
|
||||||
("avg_query_time", 0),
|
("avg_query_time", 0),
|
||||||
("avg_xact_count", 0),
|
|
||||||
("avg_sent", 0),
|
|
||||||
("avg_recv", 0),
|
("avg_recv", 0),
|
||||||
|
("avg_sent", 0),
|
||||||
|
("avg_xact_count", 0),
|
||||||
|
("avg_xact_time", 0),
|
||||||
("avg_wait_time", 0),
|
("avg_wait_time", 0),
|
||||||
("maxwait_us", 0),
|
("maxwait_us", 0),
|
||||||
("maxwait", 0),
|
("maxwait", 0),
|
||||||
@@ -506,9 +507,11 @@ impl Collector {
|
|||||||
// Calculate averages
|
// Calculate averages
|
||||||
for stat in &[
|
for stat in &[
|
||||||
"avg_query_count",
|
"avg_query_count",
|
||||||
"avgxact_count",
|
"avg_query_time",
|
||||||
"avg_sent",
|
|
||||||
"avg_recv",
|
"avg_recv",
|
||||||
|
"avg_sent",
|
||||||
|
"avg_xact_time",
|
||||||
|
"avg_xact_count",
|
||||||
"avg_wait_time",
|
"avg_wait_time",
|
||||||
] {
|
] {
|
||||||
let total_name = match stat {
|
let total_name = match stat {
|
||||||
|
|||||||
Reference in New Issue
Block a user