sorting needs to count as part of the disk job to get proper proportions of disk thread time metrics

This commit is contained in:
Arvid Norberg 2011-03-20 06:37:19 +00:00
parent e4df633157
commit c1620de8d8
1 changed files with 4 additions and 5 deletions

View File

@ -1611,6 +1611,10 @@ namespace libtorrent
disk_io_job j;
ptime now = time_now_hires();
m_queue_time.add_sample(total_microseconds(now - j.start_time));
ptime operation_start = now;
if (!m_jobs.empty())
{
// we have a job in the job queue. If it's
@ -1751,13 +1755,8 @@ namespace libtorrent
m_ios.post(m_queue_callback);
}
ptime now = time_now_hires();
m_queue_time.add_sample(total_microseconds(now - j.start_time));
flush_expired_pieces();
ptime operation_start = now;
int ret = 0;
TORRENT_ASSERT(j.storage