From ff7bbc6cd0612fc04cca84c3b051164119fa04d1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 14 Mar 2011 03:35:18 +0000 Subject: [PATCH] log disk cache in session stats --- parse_session_stats.py | 3 ++- src/session_impl.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/parse_session_stats.py b/parse_session_stats.py index c507865b7..9a5f62739 100755 --- a/parse_session_stats.py +++ b/parse_session_stats.py @@ -60,7 +60,8 @@ gen_report('piece_picker_end_game', ['end game piece picker blocks', 'strict end gen_report('piece_picker', ['piece picks', 'reject piece picks', 'unchoked piece picks', 'incoming redundant piece picks', 'incoming piece picks', 'end game piece picks', 'snubbed piece picks']) gen_report('bandwidth', ['% failed payload bytes', '% wasted payload bytes', '% protocol bytes']) gen_report('disk_time', ['disk read time', 'disk write time', 'disk queue time']) -gen_report('disk_cache', ['disk block read', 'read cache hits', 'disk block written']) +gen_report('disk_cache_hits', ['disk block read', 'read cache hits', 'disk block written']) +gen_report('disk_cache', ['read disk cache size', 'disk cache size', 'disk buffer allocations']) gen_report('disk_queue', ['disk queue size', 'disk queued bytes']) gen_report('waste', ['failed bytes', 'redundant bytes', 'download rate']) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 6a50c65bf..3cb9c4c7f 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -936,6 +936,9 @@ namespace aux { ":failed bytes" ":redundant bytes" ":error torrents" + ":read disk cache size" + ":disk cache size" + ":disk buffer allocations" "\n\n", m_stats_logger); } #endif @@ -2702,7 +2705,7 @@ namespace aux { "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t" "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t" "%f\t%f\t%f\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t" - "%d\t%d\t%d\t%d\n" + "%d\t%d\t%d\t%d\t%d\t%d\t%d\n" , total_milliseconds(now - m_last_log_rotation) / 1000.f , int(m_stat.total_upload() - m_last_uploaded) , int(m_stat.total_download() - m_last_downloaded) @@ -2777,6 +2780,9 @@ namespace aux { , int(m_total_failed_bytes - m_last_failed) , int(m_total_redundant_bytes - m_last_redundant) , error_torrents + , cs.read_cache_size + , cs.cache_size + , cs.total_used_buffers ); m_last_cache_status = cs; m_last_failed = m_total_failed_bytes;