aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/executor
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/executor')
-rw-r--r--vespalib/src/tests/executor/blocking_executor_stress.cpp2
-rw-r--r--vespalib/src/tests/executor/blockingthreadstackexecutor_test.cpp8
-rw-r--r--vespalib/src/tests/executor/stress_test.cpp2
-rw-r--r--vespalib/src/tests/executor/threadstackexecutor_test.cpp10
4 files changed, 11 insertions, 11 deletions
diff --git a/vespalib/src/tests/executor/blocking_executor_stress.cpp b/vespalib/src/tests/executor/blocking_executor_stress.cpp
index 7292e374559..870c8cee920 100644
--- a/vespalib/src/tests/executor/blocking_executor_stress.cpp
+++ b/vespalib/src/tests/executor/blocking_executor_stress.cpp
@@ -33,7 +33,7 @@ struct MyTask : Executor::Task {
}
};
-TEST_MT_F("stress test block thread stack executor", 8, BlockingThreadStackExecutor(4, 128000, 1000))
+TEST_MT_F("stress test block thread stack executor", 8, BlockingThreadStackExecutor(4, 1000))
{
size_t loop_cnt = 100;
for (size_t i = 0; i < loop_cnt; ++i) {
diff --git a/vespalib/src/tests/executor/blockingthreadstackexecutor_test.cpp b/vespalib/src/tests/executor/blockingthreadstackexecutor_test.cpp
index d811ded9e95..8342257f3e7 100644
--- a/vespalib/src/tests/executor/blockingthreadstackexecutor_test.cpp
+++ b/vespalib/src/tests/executor/blockingthreadstackexecutor_test.cpp
@@ -48,7 +48,7 @@ struct Fixture
Gate blockedExecuteGate;
Fixture(uint32_t taskLimit, uint32_t tasksToWaitFor)
- : executor(1, 128000, taskLimit),
+ : executor(1, taskLimit),
workersEntryGate(),
workersExitLatch(tasksToWaitFor),
blockedExecuteGate()
@@ -123,14 +123,14 @@ vespalib::string get_worker_stack_trace(BlockingThreadStackExecutor &executor) {
VESPA_THREAD_STACK_TAG(my_stack_tag);
-TEST_F("require that executor has appropriate default thread stack tag", BlockingThreadStackExecutor(1, 128_Ki, 10)) {
+TEST_F("require that executor has appropriate default thread stack tag", BlockingThreadStackExecutor(1, 10)) {
vespalib::string trace = get_worker_stack_trace(f1);
if (!EXPECT_TRUE(trace.find("unnamed_blocking_executor") != vespalib::string::npos)) {
fprintf(stderr, "%s\n", trace.c_str());
}
}
-TEST_F("require that executor thread stack tag can be set", BlockingThreadStackExecutor(1, 128_Ki, 10, my_stack_tag)) {
+TEST_F("require that executor thread stack tag can be set", BlockingThreadStackExecutor(1, 10, my_stack_tag)) {
vespalib::string trace = get_worker_stack_trace(f1);
if (!EXPECT_TRUE(trace.find("my_stack_tag") != vespalib::string::npos)) {
fprintf(stderr, "%s\n", trace.c_str());
@@ -140,7 +140,7 @@ TEST_F("require that executor thread stack tag can be set", BlockingThreadStackE
TEST_F("require that tasks posted from internal worker thread will not block executor", TimeBomb(60)) {
size_t cnt = 0;
Gate fork_done;
- BlockingThreadStackExecutor executor(1, 128_Ki, 10);
+ BlockingThreadStackExecutor executor(1, 10);
struct IncTask : Executor::Task {
size_t &cnt;
IncTask(size_t &cnt_in) : cnt(cnt_in) {}
diff --git a/vespalib/src/tests/executor/stress_test.cpp b/vespalib/src/tests/executor/stress_test.cpp
index 869cc05fa4b..923b7eea3a5 100644
--- a/vespalib/src/tests/executor/stress_test.cpp
+++ b/vespalib/src/tests/executor/stress_test.cpp
@@ -105,7 +105,7 @@ Test::Main()
fprintf(stderr, "calibrating task size...\n");
uint32_t taskSize = calibrate(ms_per_task);
fprintf(stderr, "calibrated task size: %u\n", taskSize);
- ThreadStackExecutor executor(threads, 128000, 5000 + threads);
+ ThreadStackExecutor executor(threads, 5000 + threads);
{
Gate gate;
CountDownLatch latch(threads);
diff --git a/vespalib/src/tests/executor/threadstackexecutor_test.cpp b/vespalib/src/tests/executor/threadstackexecutor_test.cpp
index 688d98ff032..7d77e224fe5 100644
--- a/vespalib/src/tests/executor/threadstackexecutor_test.cpp
+++ b/vespalib/src/tests/executor/threadstackexecutor_test.cpp
@@ -39,7 +39,7 @@ struct MyState {
CountDownLatch latch; // to wait for workers
ThreadStackExecutor executor;
bool checked;
- MyState() : gate(), latch(10), executor(NUM_THREADS, 128000, 20), checked(false)
+ MyState() : gate(), latch(10), executor(NUM_THREADS, 20), checked(false)
{
MyTask::resetStats();
}
@@ -132,7 +132,7 @@ struct WaitState {
std::vector<Gate> block_task;
std::vector<Gate> wait_done;
WaitState(size_t num_threads)
- : executor(num_threads / 2, 128000), block_task(num_threads - 2), wait_done(num_threads - 1)
+ : executor(num_threads / 2), block_task(num_threads - 2), wait_done(num_threads - 1)
{
for (auto &gate: block_task) {
auto result = executor.execute(std::make_unique<WaitTask>(gate));
@@ -175,14 +175,14 @@ vespalib::string get_worker_stack_trace(ThreadStackExecutor &executor) {
VESPA_THREAD_STACK_TAG(my_stack_tag);
-TEST_F("require that executor has appropriate default thread stack tag", ThreadStackExecutor(1, 128_Ki)) {
+TEST_F("require that executor has appropriate default thread stack tag", ThreadStackExecutor(1)) {
vespalib::string trace = get_worker_stack_trace(f1);
if (!EXPECT_TRUE(trace.find("unnamed_nonblocking_executor") != vespalib::string::npos)) {
fprintf(stderr, "%s\n", trace.c_str());
}
}
-TEST_F("require that executor thread stack tag can be set", ThreadStackExecutor(1, 128_Ki, my_stack_tag)) {
+TEST_F("require that executor thread stack tag can be set", ThreadStackExecutor(1, my_stack_tag)) {
vespalib::string trace = get_worker_stack_trace(f1);
if (!EXPECT_TRUE(trace.find("my_stack_tag") != vespalib::string::npos)) {
fprintf(stderr, "%s\n", trace.c_str());
@@ -215,7 +215,7 @@ TEST("require that stats can be accumulated") {
}
TEST("Test that utilization is computed") {
- ThreadStackExecutor executor(1, 128_Ki);
+ ThreadStackExecutor executor(1);
std::this_thread::sleep_for(1s);
auto stats = executor.getStats();
EXPECT_GREATER(0.50, stats.getUtil());