Skip to content

Commit

Permalink
refactor(http1): emit trace logs when buffering write data
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jun 2, 2021
1 parent eb0c646 commit 0d82405
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/proto/h1/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ where
let head = self.headers_mut();

head.maybe_unshift(buf.remaining());
trace!(
self.len = head.remaining(),
buf.len = buf.remaining(),
"buffer.flatten"
);
//perf: This is a little faster than <Vec as BufMut>>::put,
//but accomplishes the same result.
loop {
Expand All @@ -527,6 +532,11 @@ where
}
}
WriteStrategy::Queue => {
trace!(
self.len = self.remaining(),
buf.len = buf.remaining(),
"buffer.queue"
);
self.queue.push(buf.into());
}
}
Expand Down

0 comments on commit 0d82405

Please sign in to comment.