log more peer errors in stats log
This commit is contained in:
parent
9715fbdb3a
commit
88663bfbde
|
@ -867,6 +867,9 @@ namespace libtorrent
|
|||
// the number of peers that were disconnected this
|
||||
// tick due to protocol error
|
||||
int m_error_peers;
|
||||
int m_disconnected_peers;
|
||||
int m_eof_peers;
|
||||
int m_connreset_peers;
|
||||
#endif
|
||||
|
||||
// each second tick the timer takes a little
|
||||
|
|
|
@ -45,12 +45,13 @@ def gen_report(name, lines):
|
|||
os.system('gnuplot session_stats_%s.gnuplot' % name);
|
||||
|
||||
gen_report('torrents', ['downloading torrents', 'seeding torrents', 'checking torrents', 'stopped torrents'])
|
||||
gen_report('peers', ['peers', 'connecting peers', 'unchoked peers', 'peers disk-up', 'peers disk-down', 'peers bw-up', 'peers bw-down', 'error peers'])
|
||||
gen_report('peers_list', ['num list peers'])
|
||||
gen_report('peers', ['peers', 'connecting peers', 'unchoked peers', 'peers disk-up', 'peers disk-down', 'peers bw-up', 'peers bw-down'])
|
||||
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-10', 'peers down 10-50', 'peers down 50-100', 'peers down 500-1000', 'peers down 1000-'])
|
||||
gen_report('peer_ul_rates', ['peers up 0', 'peers up 0-10', 'peers up 10-50', 'peers up 50-100', 'peers up 500-1000', 'peers up 1000-'])
|
||||
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 interested', 'peers down unchoked', 'peers down requests'])
|
||||
gen_report('peer_errors', ['error peers', 'peer disconnected', 'peers eof', 'peers connection reset'])
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/torrent.hpp"
|
||||
#include "libtorrent/peer_info.hpp"
|
||||
#include "libtorrent/bt_peer_connection.hpp"
|
||||
#include "libtorrent/error.hpp"
|
||||
|
||||
#ifdef TORRENT_DEBUG
|
||||
#include <set>
|
||||
|
@ -3318,6 +3319,8 @@ namespace libtorrent
|
|||
|
||||
#ifdef TORRENT_STATS
|
||||
if (error == 2) ++m_ses.m_error_peers;
|
||||
if (ec == error::connection_reset) ++m_ses.m_connreset_peers;
|
||||
if (ec == error::eof) ++m_ses.m_eof_peers;
|
||||
#endif
|
||||
|
||||
// we cannot do this in a constructor
|
||||
|
|
|
@ -800,9 +800,12 @@ namespace aux {
|
|||
":peers up 100-:error peers"
|
||||
":peers down interesting:peers down unchoked:peers down requests"
|
||||
":peers up interested:peers up unchoked:peers up requests"
|
||||
"\n\n";
|
||||
":peer disconnects:peers eof:peers connection reset:\n\n";
|
||||
m_second_counter = 0;
|
||||
m_error_peers = 0;
|
||||
m_disconnected_peers = 0;
|
||||
m_eof_peers = 0;
|
||||
m_connreset_peers = 0;
|
||||
#endif
|
||||
#ifdef TORRENT_DISK_STATS
|
||||
m_buffer_usage_logger.open("buffer_stats.log", std::ios::trunc);
|
||||
|
@ -2634,8 +2637,14 @@ namespace aux {
|
|||
<< peers_up_interested << "\t"
|
||||
<< peers_up_unchoked << "\t"
|
||||
<< peers_up_requests << "\t"
|
||||
<< m_disconnected_peers << "\t"
|
||||
<< m_eof_peers << "\t"
|
||||
<< m_connreset_peers << "\t"
|
||||
<< std::endl;
|
||||
m_error_peers = 0;
|
||||
m_disconnected_peers = 0;
|
||||
m_eof_peers = 0;
|
||||
m_connreset_peers = 0;
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue