From 2a3fd79c7e92a015669530dd045e59ab659165ee Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri Date: Thu, 28 Jul 2022 12:07:26 +0800 Subject: [PATCH] Minor fix for some stats --- .gitignore | 1 + src/stats.rs | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 50ccb252..a4b78411 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.idea /target *.deb diff --git a/src/stats.rs b/src/stats.rs index e0113395..83aa9cb5 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -292,17 +292,18 @@ impl Collector { let stats_template = HashMap::from([ ("total_query_count", 0), - ("total_xact_count", 0), - ("total_sent", 0), + ("total_query_time", 0), ("total_received", 0), + ("total_sent", 0), + ("total_xact_count", 0), ("total_xact_time", 0), - ("total_query_time", 0), ("total_wait_time", 0), - ("avg_xact_time", 0), + ("avg_query_count", 0), ("avg_query_time", 0), - ("avg_xact_count", 0), - ("avg_sent", 0), ("avg_recv", 0), + ("avg_sent", 0), + ("avg_xact_count", 0), + ("avg_xact_time", 0), ("avg_wait_time", 0), ("maxwait_us", 0), ("maxwait", 0), @@ -506,9 +507,11 @@ impl Collector { // Calculate averages for stat in &[ "avg_query_count", - "avgxact_count", - "avg_sent", + "avg_query_time", "avg_recv", + "avg_sent", + "avg_xact_time", + "avg_xact_count", "avg_wait_time", ] { let total_name = match stat {