aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zenmaster/zenmaster.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/zenmaster/zenmaster.cpp b/src/zenmaster/zenmaster.cpp
index 64f04cf1e..22a2e12b0 100644
--- a/src/zenmaster/zenmaster.cpp
+++ b/src/zenmaster/zenmaster.cpp
@@ -329,8 +329,6 @@ main(int argc, char** argv)
// Spawn some zenserver processes
- Stopwatch StartTimer;
-
zen::ZenServerEnvironment TestEnv;
std::filesystem::path ProgramBaseDir = GetRunningExecutablePath().parent_path();
@@ -351,30 +349,30 @@ main(int argc, char** argv)
std::vector<std::unique_ptr<ZenServerInstance>> Instances;
- TimedBlock("Spawning instances", [&] {
- for (int i = 0; i < SpawnCount; ++i)
- {
- auto& Instance = Instances.emplace_back(std::make_unique<ZenServerInstance>(TestEnv));
+ TimedBlock(fmt::format("Spawning {} instances", SpawnCount), [&] {
+ TimedBlock("Spawning instances", [&] {
+ for (int i = 0; i < SpawnCount; ++i)
+ {
+ auto& Instance = Instances.emplace_back(std::make_unique<ZenServerInstance>(TestEnv));
- std::filesystem::path TestDir1 = TestEnv.CreateNewTestDir();
- Instance->SetTestDir(TestDir1);
- Instance->SpawnServer("--malloc=ansi");
- }
- });
+ std::filesystem::path TestDir1 = TestEnv.CreateNewTestDir();
+ Instance->SetTestDir(TestDir1);
+ Instance->SpawnServer("--malloc=ansi");
+ }
+ });
- TimedBlock("Waiting for instances", [&] {
- for (int i = 0; i < SpawnCount; ++i)
- {
- auto& Instance = Instances[i];
+ TimedBlock("Waiting for instances", [&] {
+ for (int i = 0; i < SpawnCount; ++i)
+ {
+ auto& Instance = Instances[i];
- const uint16_t PortNum = Instance->WaitUntilReady();
+ const uint16_t PortNum = Instance->WaitUntilReady();
- ZEN_INFO("Instance #{} UP - port {}", i, PortNum);
- }
+ ZEN_INFO("Instance #{} UP - port {}", i, PortNum);
+ }
+ });
});
- ZEN_INFO("Starting {} instances took {}", SpawnCount, NiceTimeSpanMs(StartTimer.GetElapsedTimeMs()));
-
ZEN_INFO("press any key to tear instances down");
zen::getch();