diff --git a/parse_session_stats.py b/parse_session_stats.py index 07cd5988f..e8350f565 100755 --- a/parse_session_stats.py +++ b/parse_session_stats.py @@ -49,9 +49,13 @@ gen_report('peers', ['peers', 'connecting peers', 'unchoked peers', 'peers disk- gen_report('peers_list', ['num list peers', 'peer storage bytes']) gen_report('overall_rates', ['upload rate', 'download rate', 'smooth upload rate', 'smooth download rate']) gen_report('peer_dl_rates', ['peers down 0', 'peers down 0-2', 'peers down 2-5', 'peers down 5-10', 'peers down 50-100', 'peers down 100-']) +gen_report('peer_dl_rates2', ['peers down 0-2', 'peers down 2-5', 'peers down 5-10', 'peers down 50-100', 'peers down 100-']) gen_report('peer_ul_rates', ['peers up 0', 'peers up 0-2', 'peers up 2-5', 'peers up 5-10', 'peers up 50-100', 'peers up 100-']) +gen_report('peer_ul_rates2', ['peers up 0-2', 'peers up 2-5', 'peers up 5-10', 'peers up 50-100', 'peers up 100-']) gen_report('disk', ['disk write queued bytes', 'disk block buffers']) gen_report('peers_upload', ['peers up interested', 'peers up unchoked', 'peers up requests']) gen_report('peers_download', ['peers down interesting', 'peers down unchoked', 'peers down requests']) gen_report('peer_errors', ['error peers', 'peer disconnects', 'peers eof', 'peers connection reset']) +gen_report('end_game', ['end game piece picks', 'strict end game piece picks', 'valid strict end game piece picks']) +gen_report('bandwidth', ['% failed payload bytes', '% wasted payload bytes', '% protocol bytes']) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index c164958fd..4cb905c68 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -807,6 +807,9 @@ namespace aux { ":end game piece picks" ":strict end game piece picks" ":valid strict end game piece picks" + ":% failed payload bytes" + ":% wasted payload bytes" + ":% protocol bytes" "\n\n"; m_second_counter = 0; m_error_peers = 0; @@ -2603,7 +2606,8 @@ namespace aux { if (!p->download_queue().empty()) ++peers_down_requests; if (p->is_peer_interested()) ++peers_up_interested; if (p->is_interesting()) ++peers_down_interesting; - if (p->send_buffer_size() > 100) ++peers_up_requests; + if (p->send_buffer_size() > 100 || !p->upload_queue().empty()) + ++peers_up_requests; int dl_bucket = 0; int dl_rate = p->statistics().download_payload_rate(); @@ -2680,6 +2684,9 @@ namespace aux { << m_end_game_piece_picks << "\t" << m_strict_end_game_piece_picks << "\t" << m_valid_strict_end_game_piece_picks << "\t" + << (float(m_total_failed_bytes) * 100.f / m_stat.total_payload_download()) << "\t" + << (float(m_total_redundant_bytes) * 100.f / m_stat.total_payload_download()) << "\t" + << (float(m_stat.total_protocol_download()) * 100.f / m_stat.total_download()) << "\t" << std::endl; m_error_peers = 0; m_disconnected_peers = 0;