Skip to content

Commit 8fefc80

Browse files
authored
Speedup Restore_block42 (#7295)
1 parent b5fa3c3 commit 8fefc80

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ydb/core/blobstorage/dsproxy/ut_strategy/strategy_ut.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,15 @@ void RunStrategyTest(TBlobStorageGroupType type) {
9797

9898
std::unordered_map<TString, std::tuple<EStrategyOutcome, TString>> transitions;
9999

100-
for (ui32 iter = 0; iter < 1'000'000; ++iter) {
100+
TString data(1000, 'x');
101+
TLogoBlobID id(1'000'000'000, 1, 1, 0, data.size(), 0);
102+
std::vector<TRope> parts(type.TotalPartCount());
103+
ErasureSplit(TBlobStorageGroupType::CrcModeNone, type, TRope(data), parts);
104+
105+
for (ui32 iter = 0; iter < 100'000; ++iter) {
101106
Ctest << "iteration# " << iter << Endl;
102107

103108
TBlackboard blackboard(&info, &groupQueues, NKikimrBlobStorage::UserData, NKikimrBlobStorage::FastRead);
104-
TString data(1000, 'x');
105-
TLogoBlobID id(1'000'000'000, 1, 1, 0, data.size(), 0);
106-
std::vector<TRope> parts(type.TotalPartCount());
107-
ErasureSplit(TBlobStorageGroupType::CrcModeNone, type, TRope(data), parts);
108109
blackboard.RegisterBlobForPut(id, 0);
109110
for (ui32 i = 0; i < parts.size(); ++i) {
110111
blackboard.AddPartToPut(id, i, TRope(parts[i]));

0 commit comments

Comments
 (0)