log outstanding reading bytes from peers in stats log
This commit is contained in:
parent
cda738abc6
commit
85db40e2c5
|
@ -608,6 +608,8 @@ namespace libtorrent
|
||||||
// start downloading payload again
|
// start downloading payload again
|
||||||
void on_disk();
|
void on_disk();
|
||||||
|
|
||||||
|
int num_reading_bytes() const { return m_reading_bytes; }
|
||||||
|
|
||||||
enum sync_t { read_async, read_sync };
|
enum sync_t { read_async, read_sync };
|
||||||
void setup_receive(sync_t sync = read_sync);
|
void setup_receive(sync_t sync = read_sync);
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,7 @@ reports = [
|
||||||
('disk_readback', '% of written blocks', '%%', 'portion of written blocks that had to be read back for hash verification', ['% read back']),
|
('disk_readback', '% of written blocks', '%%', 'portion of written blocks that had to be read back for hash verification', ['% read back']),
|
||||||
('disk_queue', 'number of queued disk jobs', '', 'queued disk jobs', ['disk queue size', 'disk read queue size', 'read job queue size limit']),
|
('disk_queue', 'number of queued disk jobs', '', 'queued disk jobs', ['disk queue size', 'disk read queue size', 'read job queue size limit']),
|
||||||
('disk_iops', 'operations/s', '', 'number of disk operations per second', ['read ops/s', 'write ops/s', 'smooth read ops/s', 'smooth write ops/s']),
|
('disk_iops', 'operations/s', '', 'number of disk operations per second', ['read ops/s', 'write ops/s', 'smooth read ops/s', 'smooth write ops/s']),
|
||||||
|
('disk pending reads', 'Bytes', '', 'number of bytes peers are waiting for to be read from the disk', ['pending reading bytes']),
|
||||||
('mixed mode', 'rate', 'B/s', 'rates by transport protocol', ['TCP up rate','TCP down rate','uTP up rate','uTP down rate','TCP up limit','TCP down limit']),
|
('mixed mode', 'rate', 'B/s', 'rates by transport protocol', ['TCP up rate','TCP down rate','uTP up rate','uTP down rate','TCP up limit','TCP down limit']),
|
||||||
('uTP delay', 'buffering delay', 's', 'network delays measured by uTP', ['uTP peak send delay','uTP avg send delay']),
|
('uTP delay', 'buffering delay', 's', 'network delays measured by uTP', ['uTP peak send delay','uTP avg send delay']),
|
||||||
('uTP delay histogram', 'buffering delay', 's', 'network delays measured by uTP', ['uTP avg send delay'], True),
|
('uTP delay histogram', 'buffering delay', 's', 'network delays measured by uTP', ['uTP avg send delay'], True),
|
||||||
|
|
|
@ -1042,6 +1042,7 @@ namespace aux {
|
||||||
":page faults"
|
":page faults"
|
||||||
":smooth read ops/s"
|
":smooth read ops/s"
|
||||||
":smooth write ops/s"
|
":smooth write ops/s"
|
||||||
|
":pending reading bytes"
|
||||||
"\n\n", m_stats_logger);
|
"\n\n", m_stats_logger);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3277,6 +3278,7 @@ namespace aux {
|
||||||
int peers_down_unchoked = 0;
|
int peers_down_unchoked = 0;
|
||||||
int peers_up_unchoked = 0;
|
int peers_up_unchoked = 0;
|
||||||
int num_end_game_peers = 0;
|
int num_end_game_peers = 0;
|
||||||
|
int reading_bytes = 0;
|
||||||
for (connection_map::iterator i = m_connections.begin()
|
for (connection_map::iterator i = m_connections.begin()
|
||||||
, end(m_connections.end()); i != end; ++i)
|
, end(m_connections.end()); i != end; ++i)
|
||||||
{
|
{
|
||||||
|
@ -3296,6 +3298,7 @@ namespace aux {
|
||||||
if (p->send_buffer_size() > 100 || !p->upload_queue().empty())
|
if (p->send_buffer_size() > 100 || !p->upload_queue().empty())
|
||||||
++peers_up_requests;
|
++peers_up_requests;
|
||||||
if (p->endgame()) ++num_end_game_peers;
|
if (p->endgame()) ++num_end_game_peers;
|
||||||
|
reading_bytes += p->num_reading_bytes();
|
||||||
|
|
||||||
int dl_bucket = 0;
|
int dl_bucket = 0;
|
||||||
int dl_rate = p->statistics().download_payload_rate();
|
int dl_rate = p->statistics().download_payload_rate();
|
||||||
|
@ -3488,6 +3491,8 @@ namespace aux {
|
||||||
STAT_LOG(d, m_read_ops.mean());
|
STAT_LOG(d, m_read_ops.mean());
|
||||||
STAT_LOG(d, m_write_ops.mean());
|
STAT_LOG(d, m_write_ops.mean());
|
||||||
|
|
||||||
|
STAT_LOG(d, reading_bytes);
|
||||||
|
|
||||||
fprintf(m_stats_logger, "\n");
|
fprintf(m_stats_logger, "\n");
|
||||||
|
|
||||||
#undef STAT_LOG
|
#undef STAT_LOG
|
||||||
|
|
Loading…
Reference in New Issue