Skip to main content

bench_apply

Benchmarks the asynchronous application of tasks by timing the submission of a specified number of tasks to a producer and printing the elapsed time.

def bench_apply(
n: int = DEFAULT_ITS
) - > null

Measures the performance of asynchronously dispatching a batch of tasks to the message broker. This function acquires a producer from the application pool to efficiently queue multiple task instances and prints the total elapsed time for the operation.

Parameters

NameTypeDescription
nint = DEFAULT_ITSThe number of tasks to be asynchronously applied and the value passed as an argument to each task.

Returns

TypeDescription
nullNothing is returned; the results are printed to standard output.