diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-04-15 22:29:19 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-04-15 22:36:28 +0300 |
commit | 2a00aa371a6061ce6f5cb034a1f6c430a469a6f3 (patch) | |
tree | 61d0f55af90068c733d87a152e55ce12cfecc00c | |
parent | bbefdb67b85b033ec67fef5f5a6ecbc0fc09e53c (diff) | |
download | ydb-2a00aa371a6061ce6f5cb034a1f6c430a469a6f3.tar.gz |
Intermediate changes
-rw-r--r-- | yt/yt/core/rpc/unittests/rpc_ut.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp index c1525b0a8b..7bd52df717 100644 --- a/yt/yt/core/rpc/unittests/rpc_ut.cpp +++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp @@ -526,10 +526,10 @@ TYPED_TEST(TNotGrpcTest, TrackedRegularAttachments) // Attachment allocator proactively allocate slice of 4 KB. // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate. // default stub = 4096. - // header + body = 110 bytes. + // header + body = 103 bytes. // attachments = 22 bytes. - // sum is 4228 bytes. - EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4228 + 32768); + // sum is 4221 bytes. + EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4221 + 32768); EXPECT_EQ(3u, attachments.size()); EXPECT_EQ("Hello_", StringFromSharedRef(attachments[0])); EXPECT_EQ("from_", StringFromSharedRef(attachments[1])); @@ -594,8 +594,8 @@ TYPED_TEST(TNotGrpcTest, Compression) // attachmentStrings[0].size() = 29 * 2 bytes from decoder. // attachmentStrings[1].size() = 36 * 2 bytes from decoder. // attachmentStrings[2].size() = 90 * 2 bytes from decoder. - // sum is 4591 bytes. - EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4591 + 32768); + // sum is 4584 bytes. + EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4584 + 32768); EXPECT_TRUE(rsp->message() == message); EXPECT_GE(rsp->GetResponseMessage().Size(), static_cast<size_t>(2)); const auto& serializedResponseBody = SerializeProtoToRefWithCompression(*rsp, responseCodecId); @@ -844,9 +844,9 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking) { auto rpcUsage = memoryUsageTracker->GetTotalUsage(); - // 1261568 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 110 (header + body). + // 1292468 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 103 (header + body). // 32768 - socket buffers, 4096 - default size per request. - EXPECT_GE(rpcUsage, 1294568); + EXPECT_GE(rpcUsage, 1292468); } } @@ -863,10 +863,10 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections) } { - // 11059200 / 300 = 36974 = 32768 + 4096 + 110 (header + body). + // 11059200 / 300 = 36974 = 32768 + 4096 + 103 (header + body). // 4 KB - stub for request. // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate. - EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 11092200); + EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 11090100); } } @@ -920,9 +920,9 @@ TYPED_TEST(TNotGrpcTest, MemoryOvercommit) // Attachment allocator proactively allocate slice of 4 KB. // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate. // default stub = 4096. - // header + body = 110 bytes. + // header + body = 103 bytes. // attachments = 6_KB kbytes. - EXPECT_GE(rpcUsage, 32768 + 4096 + 6144 + 110); + EXPECT_GE(rpcUsage, 32768 + 4096 + 6144 + 103); } } |