forked from premiere/premiere-libtorrent
log average disk job time instead of cache time
This commit is contained in:
parent
3734ccae24
commit
782bc974a1
|
@ -171,7 +171,7 @@ namespace libtorrent
|
|||
, average_read_time(0)
|
||||
, average_write_time(0)
|
||||
, average_hash_time(0)
|
||||
, average_cache_time(0)
|
||||
, average_job_time(0)
|
||||
, average_sort_time(0)
|
||||
, job_queue_length(0)
|
||||
{}
|
||||
|
@ -208,7 +208,7 @@ namespace libtorrent
|
|||
int average_read_time;
|
||||
int average_write_time;
|
||||
int average_hash_time;
|
||||
int average_cache_time;
|
||||
int average_job_time;
|
||||
int average_sort_time;
|
||||
int job_queue_length;
|
||||
};
|
||||
|
@ -450,9 +450,8 @@ namespace libtorrent
|
|||
// average hash time (in microseconds)
|
||||
sliding_average<512> m_hash_time;
|
||||
|
||||
// average disk cache time (in microseconds)
|
||||
// scanning the cache for pieces to flush
|
||||
sliding_average<512> m_cache_time;
|
||||
// average time to serve a job (any job) in microseconds
|
||||
sliding_average<512> m_job_time;
|
||||
|
||||
// average time to ask for physical offset on disk
|
||||
// and insert into queue
|
||||
|
|
|
@ -343,7 +343,7 @@ namespace libtorrent
|
|||
ret.average_read_time = m_read_time.mean();
|
||||
ret.average_write_time = m_write_time.mean();
|
||||
ret.average_hash_time = m_hash_time.mean();
|
||||
ret.average_cache_time = m_cache_time.mean();
|
||||
ret.average_job_time = m_job_time.mean();
|
||||
ret.average_sort_time = m_sort_time.mean();
|
||||
ret.job_queue_length = m_jobs.size() + m_sorted_read_jobs.size();
|
||||
|
||||
|
@ -1712,7 +1712,6 @@ namespace libtorrent
|
|||
flush_expired_pieces();
|
||||
|
||||
ptime operation_start = time_now_hires();
|
||||
m_cache_time.add_sample(total_microseconds(operation_start - now));
|
||||
|
||||
int ret = 0;
|
||||
|
||||
|
@ -2413,6 +2412,8 @@ namespace libtorrent
|
|||
|
||||
TORRENT_ASSERT(!j.storage || !j.storage->error());
|
||||
|
||||
m_job_time.add_sample(total_microseconds(operation_start - now));
|
||||
|
||||
// if (!j.callback) std::cerr << "DISK THREAD: no callback specified" << std::endl;
|
||||
// else std::cerr << "DISK THREAD: invoking callback" << std::endl;
|
||||
TORRENT_TRY {
|
||||
|
|
|
@ -949,7 +949,7 @@ namespace aux {
|
|||
":disk cache size"
|
||||
":disk buffer allocations"
|
||||
":disk hash time"
|
||||
":disk cache time"
|
||||
":disk job time"
|
||||
":disk sort time"
|
||||
":connection attempts"
|
||||
":banned peers"
|
||||
|
@ -2810,7 +2810,7 @@ namespace aux {
|
|||
, cs.cache_size
|
||||
, cs.total_used_buffers
|
||||
, int(cs.average_hash_time)
|
||||
, int(cs.average_cache_time)
|
||||
, int(cs.average_job_time)
|
||||
, int(cs.average_sort_time)
|
||||
, m_connection_attempts
|
||||
, m_num_banned_peers
|
||||
|
|
Loading…
Reference in New Issue