refactor(http1): emit trace logs when buffering write data

This commit is contained in:
Sean McArthur
2021-05-26 12:54:09 -07:00
parent eb0c646395
commit 0d82405a7b

View File

@@ -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 {
@@ -527,6 +532,11 @@ where
}
}
WriteStrategy::Queue => {
trace!(
self.len = self.remaining(),
buf.len = buf.remaining(),
"buffer.queue"
);
self.queue.push(buf.into());
}
}