From 508ac5f8649b2357c05adb57e0fcbf96752b1441 Mon Sep 17 00:00:00 2001 From: wuziniu Date: Tue, 19 Mar 2024 10:45:21 -0400 Subject: [PATCH] adding brad runner with variable clients (run_variable_clients.py) --- workloads/IMDB_extended/run_variable_clients.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workloads/IMDB_extended/run_variable_clients.py b/workloads/IMDB_extended/run_variable_clients.py index cf2d0a52..bcde8bf2 100644 --- a/workloads/IMDB_extended/run_variable_clients.py +++ b/workloads/IMDB_extended/run_variable_clients.py @@ -443,7 +443,7 @@ def adjust_num_running_clients( for i in pause_clients: assert ( i not in self.paused_clients - ), f"trying to pause a client that is already paused" + ), f"trying to pause a client that is already paused: {i}" if verbose: print(f"pausing client {i}") self.pause_semaphore[i].release() @@ -460,7 +460,7 @@ def adjust_num_running_clients( for i in resume_clients: assert ( i not in self.running_clients - ), f"trying to resume a running client" + ), f"trying to resume a running client: {i}" if verbose: print(f"resuming client {i}") self.resume_semaphore[i].release() @@ -711,7 +711,9 @@ def main(): # N.B. `value = 0` since we use this for synchronization, not mutual exclusion. # pylint: disable-next=no-member control_semaphore = [mgr.Semaphore(value=0) for _ in range(args.num_clients)] + # pylint: disable-next=no-member pause_semaphore = [mgr.Semaphore(value=0) for _ in range(args.num_clients)] + # pylint: disable-next=no-member resume_semaphore = [mgr.Semaphore(value=0) for _ in range(args.num_clients)] if args.run_simulation: