read time is only cache misses
This commit is contained in:
parent
fb8e1d8611
commit
9edb348093
|
@ -856,7 +856,8 @@ used in peer connections.
|
|||
has to wait in the job queue before it get processed.
|
||||
|
||||
``average_read_time`` is the number of microseconds a read job takes to
|
||||
wait in the queue and complete, in microseconds.
|
||||
wait in the queue and complete, in microseconds. This only includes
|
||||
cache misses.
|
||||
|
||||
``job_queue_length`` is the number of jobs in the job queue.
|
||||
|
||||
|
|
|
@ -1868,6 +1868,12 @@ namespace libtorrent
|
|||
break;
|
||||
}
|
||||
++m_cache_stats.blocks_read;
|
||||
hit = false;
|
||||
}
|
||||
if (!hit)
|
||||
{
|
||||
ptime now = time_now_hires();
|
||||
m_read_time.add_sample(total_microseconds(now - j.start_time));
|
||||
}
|
||||
TORRENT_ASSERT(j.buffer == read_holder.get());
|
||||
read_holder.release();
|
||||
|
@ -2227,8 +2233,6 @@ namespace libtorrent
|
|||
&& j.buffer != 0)
|
||||
rename_buffer(j.buffer, "posted send buffer");
|
||||
#endif
|
||||
ptime now = time_now_hires();
|
||||
m_read_time.add_sample(total_microseconds(now - j.start_time));
|
||||
post_callback(j.callback, j, ret);
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
} catch (std::exception&)
|
||||
|
|
Loading…
Reference in New Issue