diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-07-16 00:23:31 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-19 05:10:36 -0700 |
commit | 56c182ca23a7552dfa4c19667f82ca1313fb9e55 (patch) | |
tree | 62929bfa0f5b233e4813340b663a962c1e012011 | |
parent | 11cae38ac007ed55c2bc1217da1a80fc367100e8 (diff) |
dump total cache used in quickread in the statedump information
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1059 (enhancements for getting statistics from performance translators)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1059
-rw-r--r-- | xlators/performance/quick-read/src/quick-read.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index ddf37753e..f277aa449 100644 --- a/xlators/performance/quick-read/src/quick-read.c +++ b/xlators/performance/quick-read/src/quick-read.c @@ -2347,7 +2347,7 @@ qr_priv_dump (xlator_t *this) uint32_t file_count = 0; uint32_t i = 0; qr_inode_t *curr = NULL; - + uint64_t total_size = 0; if (!this) return -1; @@ -2383,12 +2383,15 @@ qr_priv_dump (xlator_t *this) for (i = 0; i < conf->max_pri; i++) { list_for_each_entry (curr, &table->lru[i], lru) { file_count++; + total_size += curr->stbuf.ia_size; } } } gf_proc_dump_build_key (key, key_prefix, "total_files_cached"); gf_proc_dump_write (key, "%d", file_count); + gf_proc_dump_build_key (key, key_prefix, "total_cache_used"); + gf_proc_dump_write (key, "%d", total_size); out: return 0; |