You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run a farm of <WORKERS> workers and <TASKS> tasks. Each task is <MS>ms long and has a size of <BYTES> bytes. Using subinterpreters or multiprocessing based strategy
strategy="Not using any strategy"ifuse_main_threadelsef"Using {'subinterpreters'ifuse_subinterpreterselse'processes'}-based strategy"
64
+
print(f"Running a farm of {nworkers} workers and {n_tasks} tasks. Each task is {task_ms}ms long and has a size of {data_size} bytes. {strategy}", file=sys.stderr)
parser=argparse.ArgumentParser(description='Process some tasks.')
79
+
parser=argparse.ArgumentParser(description='Run a farm of <WORKERS> workers and <TASKS> tasks. Each task is <MS>ms long and has a size of <BYTES> bytes. Using subinterpreters or multiprocessing based strategy')
99
80
parser.add_argument('-tasks', type=int, help='Number of tasks to process', required=True)
100
81
parser.add_argument('-workers', type=int, help='Number of workers of the farm', required=True)
101
-
parser.add_argument('-ms', type=int, help='Duration in milliseconds of one task', required=True)
82
+
parser.add_argument('-ms', type=int, help='Duration, in milliseconds, of one task', required=True)
102
83
parser.add_argument('-bytes', type=int, help='The size, in bytes, of one task', required=True)
103
-
parser.add_argument('-blocking-mode', help='The blocking mode of the farm', required=False, action='store_true', default=None)
84
+
parser.add_argument('-blocking-mode', help='Enable blocking mode of the farm', required=False, action='store_true', default=None)
0 commit comments