Skip to main content

bench_work

Initializes and starts a WorkController with a specified concurrency and queue, while optionally configuring the logging subsystem based on the provided loglevel or environment variables.

def bench_work(
n: int = DEFAULT_ITS,
loglevel: string = 'CRITICAL'
) - > null

Initializes and starts a Celery work controller to process tasks for benchmarking purposes, monitoring the total task count until completion.

Parameters

NameTypeDescription
nint = DEFAULT_ITSThe expected number of tasks to be processed by the worker before exiting.
loglevelstring = 'CRITICAL'The logging verbosity level for the worker subsystem, which can be overridden by the BENCH_LOGLEVEL environment variable.

Returns

TypeDescription
nullNothing is returned; the function raises SystemExit upon completion of the workload.