forked from premiere/premiere-libtorrent
log number of upload-only torrents in session stats
This commit is contained in:
parent
9915d72e4c
commit
6780114937
|
@ -884,7 +884,8 @@ namespace aux {
|
||||||
|
|
||||||
fputs("second:upload rate:download rate:downloading torrents:seeding torrents"
|
fputs("second:upload rate:download rate:downloading torrents:seeding torrents"
|
||||||
":peers:connecting peers:disk block buffers:num list peers"
|
":peers:connecting peers:disk block buffers:num list peers"
|
||||||
":peer allocations:peer storage bytes:checking torrents:stopped torrents"
|
":peer allocations:peer storage bytes"
|
||||||
|
":checking torrents:stopped torrents:upload-only torrents"
|
||||||
":peers bw-up:peers bw-down:peers disk-up:peers disk-down"
|
":peers bw-up:peers bw-down:peers disk-up:peers disk-down"
|
||||||
":smooth upload rate:smooth download rate:disk write queued bytes"
|
":smooth upload rate:smooth download rate:disk write queued bytes"
|
||||||
":peers down 0:peers down 0-2:peers down 2-5:peers down 5-10:peers down 10-50"
|
":peers down 0:peers down 0-2:peers down 2-5:peers down 5-10:peers down 10-50"
|
||||||
|
@ -2568,6 +2569,7 @@ namespace aux {
|
||||||
int seeding_torrents = 0;
|
int seeding_torrents = 0;
|
||||||
int checking_torrents = 0;
|
int checking_torrents = 0;
|
||||||
int stopped_torrents = 0;
|
int stopped_torrents = 0;
|
||||||
|
int upload_only_torrents = 0;
|
||||||
static size_type downloaded = 0;
|
static size_type downloaded = 0;
|
||||||
static size_type uploaded = 0;
|
static size_type uploaded = 0;
|
||||||
size_type download_rate = (m_stat.total_download() - downloaded) * 1000 / tick_interval_ms;
|
size_type download_rate = (m_stat.total_download() - downloaded) * 1000 / tick_interval_ms;
|
||||||
|
@ -2602,6 +2604,8 @@ namespace aux {
|
||||||
++checking_torrents;
|
++checking_torrents;
|
||||||
if (i->second->is_paused())
|
if (i->second->is_paused())
|
||||||
++stopped_torrents;
|
++stopped_torrents;
|
||||||
|
if (i->second->is_upload_only())
|
||||||
|
++upload_only_torrents;
|
||||||
|
|
||||||
dq.clear();
|
dq.clear();
|
||||||
i->second->get_download_queue(dq);
|
i->second->get_download_queue(dq);
|
||||||
|
@ -2679,7 +2683,7 @@ 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%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%f\t%f\t%f\n"
|
||||||
, total_milliseconds(now - m_last_log_rotation) / 1000.f
|
, total_milliseconds(now - m_last_log_rotation) / 1000.f
|
||||||
, int(upload_rate)
|
, int(upload_rate)
|
||||||
, int(download_rate)
|
, int(download_rate)
|
||||||
|
@ -2693,6 +2697,7 @@ namespace aux {
|
||||||
, logging_allocator::allocated_bytes
|
, logging_allocator::allocated_bytes
|
||||||
, checking_torrents
|
, checking_torrents
|
||||||
, stopped_torrents
|
, stopped_torrents
|
||||||
|
, upload_only_torrents
|
||||||
, m_upload_rate.queue_size()
|
, m_upload_rate.queue_size()
|
||||||
, m_download_rate.queue_size()
|
, m_download_rate.queue_size()
|
||||||
, m_disk_queues[peer_connection::upload_channel]
|
, m_disk_queues[peer_connection::upload_channel]
|
||||||
|
|
Loading…
Reference in New Issue