dovecot-2.1: stats: Added mail_ prefix to mail transaction stati...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 12 18:26:41 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/b1870cf2d3ff
changeset: 13456:b1870cf2d3ff
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 12 18:26:29 2011 +0300
description:
stats: Added mail_ prefix to mail transaction statistics.
Also added "m" prefix for them in the internal protocol.

diffstat:

 src/plugins/stats/stats-plugin.c |  10 +++++-----
 src/stats/client-export.c        |  11 ++++++-----
 src/stats/mail-stats.c           |  11 ++++++-----
 src/stats/mail-stats.h           |   5 +++--
 4 files changed, 20 insertions(+), 17 deletions(-)

diffs (86 lines):

diff -r 74e945315e2c -r b1870cf2d3ff src/plugins/stats/stats-plugin.c
--- a/src/plugins/stats/stats-plugin.c	Mon Sep 12 16:30:51 2011 +0300
+++ b/src/plugins/stats/stats-plugin.c	Mon Sep 12 18:26:29 2011 +0300
@@ -238,13 +238,13 @@
 		    (unsigned long long)stats->disk_input);
 	str_printfa(str, "\tdiskout=%llu",
 		    (unsigned long long)stats->disk_output);
-	str_printfa(str, "\tlpath=%lu",
+	str_printfa(str, "\tmlpath=%lu",
 		    tstats->open_lookup_count + tstats->stat_lookup_count);
-	str_printfa(str, "\tlattr=%lu",
+	str_printfa(str, "\tmlattr=%lu",
 		    tstats->fstat_lookup_count + tstats->stat_lookup_count);
-	str_printfa(str, "\trcount=%lu", tstats->files_read_count);
-	str_printfa(str, "\trbytes=%llu", tstats->files_read_bytes);
-	str_printfa(str, "\tcache=%lu", tstats->cache_hit_count);
+	str_printfa(str, "\tmrcount=%lu", tstats->files_read_count);
+	str_printfa(str, "\tmrbytes=%llu", tstats->files_read_bytes);
+	str_printfa(str, "\tmcache=%lu", tstats->cache_hit_count);
 }
 
 static void stats_add_session(struct mail_user *user)
diff -r 74e945315e2c -r b1870cf2d3ff src/stats/client-export.c
--- a/src/stats/client-export.c	Mon Sep 12 16:30:51 2011 +0300
+++ b/src/stats/client-export.c	Mon Sep 12 18:26:29 2011 +0300
@@ -100,7 +100,8 @@
 #define MAIL_STATS_HEADER "\tuser_cpu\tsys_cpu" \
 	"\tmin_faults\tmaj_faults\tvol_cs\tinvol_cs" \
 	"\tdisk_input\tdisk_output" \
-	"\tlookup_path\tlookup_attr\tread_count\tread_bytes\tcache_hits\n"
+	"\tmail_lookup_path\tmail_lookup_attr" \
+	"\tmail_read_count\tmail_read_bytes\tmail_cache_hits\n"
 
 	str_printfa(str, "\t%ld.%06u", (long)stats->user_cpu.tv_sec,
 		    (unsigned int)stats->user_cpu.tv_usec);
@@ -112,10 +113,10 @@
 		    (unsigned long long)stats->disk_input,
 		    (unsigned long long)stats->disk_output);
 	str_printfa(str, "\t%u\t%u\t%u\t%llu\t%u",
-		    stats->lookup_path, stats->lookup_attr,
-		    stats->read_count,
-		    (unsigned long long)stats->read_bytes,
-		    stats->cache_hits);
+		    stats->mail_lookup_path, stats->mail_lookup_attr,
+		    stats->mail_read_count,
+		    (unsigned long long)stats->mail_read_bytes,
+		    stats->mail_cache_hits);
 }
 
 static bool
diff -r 74e945315e2c -r b1870cf2d3ff src/stats/mail-stats.c
--- a/src/stats/mail-stats.c	Mon Sep 12 16:30:51 2011 +0300
+++ b/src/stats/mail-stats.c	Mon Sep 12 18:26:29 2011 +0300
@@ -25,11 +25,12 @@
 	EN("involcs", invol_cs),
 	EN("diskin", disk_input),
 	EN("diskout", disk_output),
-	EN("lpath", lookup_path),
-	EN("lattr", lookup_attr),
-	EN("rcount", read_count),
-	EN("rbytes", read_bytes),
-	EN("cache", cache_hits)
+
+	EN("mlpath", mail_lookup_path),
+	EN("mlattr", mail_lookup_attr),
+	EN("mrcount", mail_read_count),
+	EN("mrbytes", mail_read_bytes),
+	EN("mcache", mail_cache_hits)
 };
 
 static int mail_stats_parse_timeval(const char *value, struct timeval *tv)
diff -r 74e945315e2c -r b1870cf2d3ff src/stats/mail-stats.h
--- a/src/stats/mail-stats.h	Mon Sep 12 16:30:51 2011 +0300
+++ b/src/stats/mail-stats.h	Mon Sep 12 18:26:29 2011 +0300
@@ -10,8 +10,9 @@
 	uint32_t vol_cs, invol_cs;
 	uint64_t disk_input, disk_output;
 
-	uint32_t lookup_path, lookup_attr, read_count, cache_hits;
-	uint64_t read_bytes;
+	uint32_t mail_lookup_path, mail_lookup_attr, mail_read_count;
+	uint32_t mail_cache_hits;
+	uint64_t mail_read_bytes;
 };
 
 struct mail_command {


More information about the dovecot-cvs mailing list