From ca4a053d1a66901e48c0cf9436ed1c98238d585f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 12 Mar 2011 21:41:05 +0000 Subject: [PATCH] add written disk blocks to session stats --- parse_session_stats.py | 2 +- src/session_impl.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/parse_session_stats.py b/parse_session_stats.py index a5bcf5cb7..fdc34c4f8 100755 --- a/parse_session_stats.py +++ b/parse_session_stats.py @@ -60,6 +60,6 @@ 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']) +gen_report('disk_cache', ['disk block read', 'read cache hits', 'disk block written']) gen_report('disk_queue', ['disk queue size', 'disk queued bytes']) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 0a613a7bd..16d5e2ad0 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -928,6 +928,7 @@ namespace aux { ":disk queued bytes" ":read cache hits" ":disk block read" + ":disk block written" "\n\n", m_stats_logger); } #endif @@ -2696,7 +2697,8 @@ 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" "%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\n" + "%f\t%f\t%f\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t" + "%d\n" , total_milliseconds(now - m_last_log_rotation) / 1000.f , int(upload_rate) , int(download_rate) @@ -2767,6 +2769,7 @@ namespace aux { , int(cs.queued_bytes) , int(cs.blocks_read_hit - m_last_cache_status.blocks_read_hit) , int(cs.blocks_read - m_last_cache_status.blocks_read) + , int(cs.blocks_written - m_last_cache_status.blocks_written) ); m_last_cache_status = cs; }