log buf.len()
This commit is contained in:
parent
6cc7fa7ae0
commit
fdc9243a41
1 changed files with 6 additions and 2 deletions
|
|
@ -46,23 +46,27 @@ macro_rules! timeit {
|
|||
impl TorrentStorage for TimingStorage {
|
||||
fn pread_exact(&self, file_id: usize, offset: u64, buf: &mut [u8]) -> anyhow::Result<()> {
|
||||
let storage = &self.name;
|
||||
let len = buf.len();
|
||||
timeit!(
|
||||
"pread_exact",
|
||||
self.underlying.pread_exact(file_id, offset, buf),
|
||||
file_id,
|
||||
offset,
|
||||
storage
|
||||
storage,
|
||||
len
|
||||
)
|
||||
}
|
||||
|
||||
fn pwrite_all(&self, file_id: usize, offset: u64, buf: &[u8]) -> anyhow::Result<()> {
|
||||
let storage = &self.name;
|
||||
let len = buf.len();
|
||||
timeit!(
|
||||
"pwrite_all",
|
||||
self.underlying.pwrite_all(file_id, offset, buf),
|
||||
file_id,
|
||||
offset,
|
||||
storage
|
||||
storage,
|
||||
len
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue