Skip to content

Commit d22aea9

Browse files
tlj77facebook-github-bot
authored andcommitted
Rename two latency with proper names
Summary: Make the code easier to read and search. Reviewed By: islamismailov Differential Revision: D73374259 fbshipit-source-id: 8c6ee44da82325c5d177e9231fddf4579f4c13b8
1 parent 89091b6 commit d22aea9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

third-party/thrift/src/thrift/lib/cpp2/async/RequestCallback.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ struct RpcTransportStats {
4848
uint32_t responseWireSizeBytes{0};
4949

5050
// I/O latencies
51-
std::chrono::nanoseconds requestLatency{0};
52-
std::chrono::nanoseconds responseLatency{0};
51+
std::chrono::nanoseconds requestWriteLatency{0};
52+
std::chrono::nanoseconds responseRoundTripLatency{0};
5353
};
5454

5555
class ClientReceiveState {

third-party/thrift/src/thrift/lib/cpp2/async/RocketClientChannel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,8 @@ class RocketClientChannel::SingleRequestSingleResponseCallback final
600600
stats.requestSerializedSizeBytes = requestSerializedSize_;
601601
stats.requestWireSizeBytes = requestWireSize_;
602602
stats.requestMetadataAndPayloadSizeBytes = requestMetadataAndPayloadSize_;
603-
stats.requestLatency = timeEndSend_ - timeBeginSend_;
604-
stats.responseLatency = clock::now() - timeEndSend_;
603+
stats.requestWriteLatency = timeEndSend_ - timeBeginSend_;
604+
stats.responseRoundTripLatency = clock::now() - timeEndSend_;
605605
ResponseSerializationHandler handler(protocolId_);
606606
if (payload.hasException()) {
607607
if (!payload.exception().with_exception<rocket::RocketException>(

third-party/thrift/src/thrift/lib/cpp2/transport/core/ThriftClientCallback.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ void ThriftClientCallback::onThriftResponse(
101101
cancelTimeout();
102102
if (active_) {
103103
RpcTransportStats stats;
104-
stats.requestLatency = timeEndSend_ - timeBeginSend_;
105-
stats.responseLatency = clock::now() - timeEndSend_;
104+
stats.requestWriteLatency = timeEndSend_ - timeBeginSend_;
105+
stats.responseRoundTripLatency = clock::now() - timeEndSend_;
106106

107107
active_ = false;
108108
auto tHeader = std::make_unique<transport::THeader>();

0 commit comments

Comments
 (0)