log more details on the cause of disconnects

This commit is contained in:
Arvid Norberg
2011-02-14 04:48:02 +00:00
parent a73f52a3d5
commit b471e40064
4 changed files with 30 additions and 3 deletions

View File

@@ -806,6 +806,8 @@ namespace aux {
m_incoming_piece_picks = 0;
m_end_game_piece_picks = 0;
m_snubbed_piece_picks = 0;
m_connect_timeouts = 0;
m_uninteresting_peers = 0;
rotate_stats_log();
#endif
#ifdef TORRENT_DISK_STATS
@@ -909,6 +911,8 @@ namespace aux {
":incoming piece picks"
":end game piece picks"
":snubbed piece picks"
":connect timeouts"
":uninteresting peers disconnect"
":% failed payload bytes"
":% wasted payload bytes"
":% protocol bytes"
@@ -2686,7 +2690,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"
"%d\t%d\t%d\t%d\t%d\t%d\t%d\t%f\t%f\t%f\n"
"%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t"
"%f\t%f\t%f\n"
, total_milliseconds(now - m_last_log_rotation) / 1000.f
, int(upload_rate)
, int(download_rate)
@@ -2744,6 +2749,8 @@ namespace aux {
, m_incoming_piece_picks
, m_end_game_piece_picks
, m_snubbed_piece_picks
, m_connect_timeouts
, m_uninteresting_peers
, (float(m_total_failed_bytes) * 100.f / m_stat.total_payload_download())
, (float(m_total_redundant_bytes) * 100.f / m_stat.total_payload_download())
, (float(m_stat.total_protocol_download()) * 100.f / m_stat.total_download())
@@ -2763,6 +2770,8 @@ namespace aux {
m_incoming_piece_picks = 0;
m_end_game_piece_picks = 0;
m_snubbed_piece_picks = 0;
m_connect_timeouts = 0;
m_uninteresting_peers = 0;
#endif
// --------------------------------------------------------------