Let WaitIfUpstreamIdle spin long enough to stay saturated by load_tester

This commit is contained in:
2025-08-26 15:37:04 -04:00
parent 6dbf29d1e1
commit 6e48a0ff9a
4 changed files with 24 additions and 11 deletions

View File

@@ -8,6 +8,7 @@
#include "connection.hpp"
#include "connection_handler.hpp"
#include "loop_iterations.h"
#include "perfetto_categories.hpp"
#include "server.hpp"
#include "thread_pipeline.hpp"
@@ -108,7 +109,7 @@ struct HttpHandler : ConnectionHandler {
if (!c) {
return;
}
for (volatile int i = 0; i < 1200; i = i + 1)
for (volatile int i = 0; i < loopIterations; i = i + 1)
;
}
}
@@ -152,7 +153,7 @@ private:
static constexpr int kFinalStageThreads = 2;
static constexpr int kLogSize = 12;
StaticThreadPipeline<std::unique_ptr<Connection>,
WaitStrategy::WaitIfStageEmpty, 1, 2>
WaitStrategy::WaitIfUpstreamIdle, 1, 2>
pipeline{kLogSize};
std::thread stage0Thread;
std::vector<std::thread> finalStageThreads;