From 313115b6663d4142c9d9da615949e83677c520bf Mon Sep 17 00:00:00 2001 From: Inderbir Date: Mon, 29 Oct 2012 05:03:03 -0700 Subject: [PATCH 1/2] Adding filestore stats : num_bytes_written, num_events_written per category --- debian_hdfs/changelog | 8 +++++++- src/store.cpp | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian_hdfs/changelog b/debian_hdfs/changelog index 1f82ab2a..0a9fca10 100644 --- a/debian_hdfs/changelog +++ b/debian_hdfs/changelog @@ -1,8 +1,14 @@ +scribe-server-hdfs-orig (0.3) lucid; urgency=low + + * provide num_messages writte and num_bytes written to a file store + + -- Platform Engineering Mon, 29 Oct 2012 12:10:45 +0530 + scribe-server-hdfs-orig (0.2.8-1) lucid; urgency=low * write queue size to scribe log when a request in throttled. - -- Platform Engineering Fri, 12 Oct 2012 11:37:00 +0530 + -- Platform Engineering Fri, 12 Oct 2012 11:37:00 +0530 scribe-server-hdfs-orig (0.2.7-1) lucid; urgency=low diff --git a/src/store.cpp b/src/store.cpp index ff65b148..ab8e7fe2 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -558,8 +558,10 @@ void FileStoreBase::printStats() { string log_str = msg.str(); LOG_OPER("[%s]", log_str.c_str()); - /*stats_file->write(msg.str());*/ + // update the stats + g_Handler->incCounter(categoryHandled, fsType + ":wrote num messages", eventsWritten); + g_Handler->incCounter(categoryHandled, fsType + ":wrote bytes", currentSize); stats_file->close(); } From 4d101ae9667d73f26d6b1098b585d62ca2fe66ef Mon Sep 17 00:00:00 2001 From: Inderbir Date: Mon, 29 Oct 2012 22:43:27 -0700 Subject: [PATCH 2/2] keep category name same and provide fstype in metric name --- src/store.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store.cpp b/src/store.cpp index ab8e7fe2..efa48a62 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -560,8 +560,8 @@ void FileStoreBase::printStats() { LOG_OPER("[%s]", log_str.c_str()); /*stats_file->write(msg.str());*/ // update the stats - g_Handler->incCounter(categoryHandled, fsType + ":wrote num messages", eventsWritten); - g_Handler->incCounter(categoryHandled, fsType + ":wrote bytes", currentSize); + g_Handler->incCounter(categoryHandled, fsType + "_wrote_num_messages", eventsWritten); + g_Handler->incCounter(categoryHandled, fsType + "_wrote_bytes", currentSize); stats_file->close(); }