Skip to main content

it

Executes a benchmark task that tracks execution time and throughput for a specified number of iterations, printing progress to stderr and terminating the process upon completion.

def it(
_: any,
n: int
) - > null

Tracks and benchmarks the execution speed of a task sequence by logging throughput statistics to stderr and terminating the process upon completion.

Parameters

NameTypeDescription
_anyA placeholder argument typically representing the task result from a previous link in a Celery chain.
nintThe total number of tasks to process before calculating final benchmarks and exiting.

Returns

TypeDescription
nullNothing is returned; the function terminates the process using os._exit(0) once the target number of tasks is reached.