timed_task#

timed_task(task_name, **context_info)[source]#

A simple context manger to measure the duration of different tasks.

Can be later plugged in to a metrics system like Statsd / Grafana / Datadog.

Parameters:

task_name (str) –

Return type:

AbstractContextManager[None]