From e65f28d073c63dd7dbc5425d98bf57b0859499de Mon Sep 17 00:00:00 2001 From: LiJie Tang Date: Tue, 9 Apr 2024 12:04:31 -0700 Subject: [PATCH] Rename RpcSizeStat to RpcTransportStat Summary: ^ This structure is used more than just size now. And we may add more for logging. Better rename it earlier than later. Reviewed By: AkramaMirza Differential Revision: D55899468 fbshipit-source-id: 4e80c73b88dc73ed188afebcf77c94f1dcfe88e2 --- .../example/gen/HelloGoodbyeThriftTransport.h | 8 ++-- .../lib/carbon/test/gen/AThriftTransport.h | 6 +-- .../lib/carbon/test/gen/BThriftTransport.h | 6 +-- .../test/gen/CarbonTestThriftTransport.h | 8 ++-- .../gen/CarbonThriftTestThriftTransport.h | 10 ++--- .../lib/network/gen/MemcacheThriftTransport.h | 42 +++++++++---------- 6 files changed, 40 insertions(+), 40 deletions(-) diff --git a/mcrouter/lib/carbon/example/gen/HelloGoodbyeThriftTransport.h b/mcrouter/lib/carbon/example/gen/HelloGoodbyeThriftTransport.h index 2a68bb3fc..7172f6495 100644 --- a/mcrouter/lib/carbon/example/gen/HelloGoodbyeThriftTransport.h +++ b/mcrouter/lib/carbon/example/gen/HelloGoodbyeThriftTransport.h @@ -58,7 +58,7 @@ folly::Try> send auto reply = thriftClient->sync_complete_goodbye( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -97,7 +97,7 @@ folly::Try> sendSy auto reply = thriftClient->sync_complete_hello( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -133,7 +133,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcVersion( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -303,4 +303,4 @@ class ThriftTransport : public ThriftTrans }; } // namespace memcache -} // namespace facebook \ No newline at end of file +} // namespace facebook diff --git a/mcrouter/lib/carbon/test/gen/AThriftTransport.h b/mcrouter/lib/carbon/test/gen/AThriftTransport.h index 0a0edcdbe..9d242305e 100644 --- a/mcrouter/lib/carbon/test/gen/AThriftTransport.h +++ b/mcrouter/lib/carbon/test/gen/AThriftTransport.h @@ -58,7 +58,7 @@ folly::Try> sen auto reply = thriftClient->sync_complete_testA( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -94,7 +94,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcVersion( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -222,4 +222,4 @@ class ThriftTransport : public ThriftTransportMeth }; } // namespace memcache -} // namespace facebook \ No newline at end of file +} // namespace facebook diff --git a/mcrouter/lib/carbon/test/gen/BThriftTransport.h b/mcrouter/lib/carbon/test/gen/BThriftTransport.h index c4742f7a1..a7b65b365 100644 --- a/mcrouter/lib/carbon/test/gen/BThriftTransport.h +++ b/mcrouter/lib/carbon/test/gen/BThriftTransport.h @@ -58,7 +58,7 @@ folly::Try> sen auto reply = thriftClient->sync_complete_testB( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -94,7 +94,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcVersion( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -222,4 +222,4 @@ class ThriftTransport : public ThriftTransportMeth }; } // namespace memcache -} // namespace facebook \ No newline at end of file +} // namespace facebook diff --git a/mcrouter/lib/carbon/test/gen/CarbonTestThriftTransport.h b/mcrouter/lib/carbon/test/gen/CarbonTestThriftTransport.h index bbbcf6e0f..f5dee8985 100644 --- a/mcrouter/lib/carbon/test/gen/CarbonTestThriftTransport.h +++ b/mcrouter/lib/carbon/test/gen/CarbonTestThriftTransport.h @@ -58,7 +58,7 @@ folly::Try> sendSyn auto reply = thriftClient->sync_complete_test( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -94,7 +94,7 @@ folly::Try auto reply = thriftClient->sync_complete_testStringKey( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -130,7 +130,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcVersion( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -277,4 +277,4 @@ class ThriftTransport : public ThriftTranspo }; } // namespace memcache -} // namespace facebook \ No newline at end of file +} // namespace facebook diff --git a/mcrouter/lib/carbon/test/gen/CarbonThriftTestThriftTransport.h b/mcrouter/lib/carbon/test/gen/CarbonThriftTestThriftTransport.h index 2d40bd960..596bc12e2 100644 --- a/mcrouter/lib/carbon/test/gen/CarbonThriftTestThriftTransport.h +++ b/mcrouter/lib/carbon/test/gen/CarbonThriftTestThriftTransport.h @@ -58,7 +58,7 @@ folly::Try> sendS auto reply = thriftClient->sync_complete_customRequest( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -94,7 +94,7 @@ folly::Try> auto reply = thriftClient->sync_complete_thrift_test( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -130,7 +130,7 @@ folly::Try> s auto reply = thriftClient->sync_complete_test( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -166,7 +166,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcVersion( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -332,4 +332,4 @@ class ThriftTransport : public ThriftT }; } // namespace memcache -} // namespace facebook \ No newline at end of file +} // namespace facebook diff --git a/mcrouter/lib/network/gen/MemcacheThriftTransport.h b/mcrouter/lib/network/gen/MemcacheThriftTransport.h index f72ce58cd..b2f9408b4 100644 --- a/mcrouter/lib/network/gen/MemcacheThriftTransport.h +++ b/mcrouter/lib/network/gen/MemcacheThriftTransport.h @@ -58,7 +58,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcAdd( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -94,7 +94,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcAppend( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -130,7 +130,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcCas( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -166,7 +166,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcDecr( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -202,7 +202,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcDelete( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -238,7 +238,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcFlushAll( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -274,7 +274,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcFlushRe( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -310,7 +310,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcGat( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -346,7 +346,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcGats( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -382,7 +382,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcGet( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -418,7 +418,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcGets( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -454,7 +454,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcIncr( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -490,7 +490,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcLeaseGet( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -526,7 +526,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcLeaseSet( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -562,7 +562,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcMetaget( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -598,7 +598,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcPrepend( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -634,7 +634,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcReplace( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -670,7 +670,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcSet( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -706,7 +706,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcTouch( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -742,7 +742,7 @@ folly::Try> sendSyncHelper( auto reply = thriftClient->sync_complete_mcVersion( std::move(rpcOptions), request); if (rpcStatsContext && reply.hasValue()) { - auto& stats = reply->responseContext.rpcSizeStats; + auto& stats = reply->responseContext.rpcTransportStats; rpcStatsContext->requestBodySize = stats.requestSerializedSizeBytes; rpcStatsContext->replySizeBeforeCompression = stats.responseSerializedSizeBytes; rpcStatsContext->replySizeAfterCompression = stats.responseWireSizeBytes; @@ -1212,4 +1212,4 @@ class ThriftTransport : public ThriftTransportMethods