From 14d4dc45f5d9b0450a1189d8bb3c809df355cf56 Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri <30620077+chhetripradeep@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:59:33 +0800 Subject: [PATCH] Minor fix for some stats (#97) --- .gitignore | 1 + src/stats.rs | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 50ccb25..a4b7841 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.idea /target *.deb diff --git a/src/stats.rs b/src/stats.rs index e011339..83aa9cb 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_received", 0), - ("total_xact_time", 0), ("total_query_time", 0), + ("total_received", 0), + ("total_sent", 0), + ("total_xact_count", 0), + ("total_xact_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 {