From 6163987f858597e92e68a61ed35be35bd4e7a552 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 15 Sep 2023 07:36:58 -0400 Subject: add more trace scopes (#362) * more trace scopes * Make sure ReplayLogEntries uses the correct size for oplog buffer * changelog --- src/zenhttp/httpasio.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/zenhttp/httpasio.cpp') diff --git a/src/zenhttp/httpasio.cpp b/src/zenhttp/httpasio.cpp index 4d1f35c2b..affe328e3 100644 --- a/src/zenhttp/httpasio.cpp +++ b/src/zenhttp/httpasio.cpp @@ -216,6 +216,8 @@ public: void InitializeForPayload(uint16_t ResponseCode, std::span BlobList) { + ZEN_TRACE_CPU("asio::InitializeForPayload"); + m_ResponseCode = ResponseCode; const uint32_t ChunkCount = gsl::narrow(BlobList.size()); @@ -578,13 +580,15 @@ HttpServerConnection::HandleRequest() // TODO: should cork/uncork for Linux? - asio::async_write(*m_Socket.get(), - ResponseBuffers, - asio::transfer_exactly(ResponseLength), - [Conn = AsSharedPtr()](const asio::error_code& Ec, std::size_t ByteCount) { - Conn->OnResponseDataSent(Ec, ByteCount, true); - }); - + { + ZEN_TRACE_CPU("asio::async_write"); + asio::async_write(*m_Socket.get(), + ResponseBuffers, + asio::transfer_exactly(ResponseLength), + [Conn = AsSharedPtr()](const asio::error_code& Ec, std::size_t ByteCount) { + Conn->OnResponseDataSent(Ec, ByteCount, true); + }); + } return; } } -- cgit v1.2.3