diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-03-28 19:07:21 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-03-28 19:07:21 +0300 |
commit | 9bfc77e035639f3ea19155b1e11410649932501b (patch) | |
tree | 313c53761c35a2d354e6b4a7920eeb954dc930a9 /library | |
parent | ca906dc6c122597389106dc59e0e81aea2a45c10 (diff) | |
download | ydb-9bfc77e035639f3ea19155b1e11410649932501b.tar.gz |
Intermediate changes
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/actors/core/actor_ut.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/library/cpp/actors/core/actor_ut.cpp b/library/cpp/actors/core/actor_ut.cpp index 86b19af546..f985108e75 100644 --- a/library/cpp/actors/core/actor_ut.cpp +++ b/library/cpp/actors/core/actor_ut.cpp @@ -98,8 +98,10 @@ Y_UNIT_TEST_SUITE(ActorBenchmark) { } STFUNC(StateFunc) { - if (--EventsCounter == 0 && ElapsedTime != nullptr) { - *ElapsedTime = Timer.Passed() / TotalEventsAmount; + if (--EventsCounter == 0) { + if (ElapsedTime != nullptr) { + *ElapsedTime = Timer.Passed() / TotalEventsAmount; + } PassAway(); return; } @@ -493,6 +495,18 @@ Y_UNIT_TEST_SUITE(ActorBenchmark) { Y_UNIT_TEST(SendActivateReceive1Pool8Threads) { RunBenchContentedThreads(8, EPoolType::Basic); } Y_UNIT_TEST(SendActivateReceive1Pool8ThreadsUnited) { RunBenchContentedThreads(8, EPoolType::United); } + Y_UNIT_TEST(SendActivateReceiveCSV) { + Cerr << "threads, actorPairs, time " << Endl; + for (ui32 threads = 1; threads <= 32; threads *= 2) { + for (ui32 actorPairs = 1; actorPairs <= 2 * threads; actorPairs++) { + auto stats = CountStats([threads, actorPairs] { + return BenchContentedThreads(threads, actorPairs, EPoolType::Basic, ESendingType::Common); + }); + Cerr << threads << "," << actorPairs << "," << actorPairs * TotalEventsAmount / stats.Mean * 1e9 << Endl; + } + } + } + Y_UNIT_TEST(SendActivateReceiveWithMailboxNeighbours) { TVector<ui32> NeighbourActors = {0, 1, 2, 3, 4, 5, 6, 7, 8, 16, 32, 64, 128, 256}; for (const auto& neighbour : NeighbourActors) { |