provide a decorator for StepProfiler (prometheus)
Currently, adding `StepProfiler` in the code, to get metrics about the duration of part of the code, implies changing the indentation, which makes it complicated to follow the commits.

It would be simpler to use a `@step_profiler()` decorator on functions.

If we do so, note that we might have to upgrade to Python 3.10 to not lose types: https://peps.python.org/pep-0612/.
provide a decorator for StepProfiler (prometheus): Currently, adding `StepProfiler` in the code, to get metrics about the duration of part of the code, implies changing the indentation, which makes it complicated to follow the commits.

It would be simpler to use a `@step_profiler()` decorator on functions.

If we do so, note that we might have to upgrade to Python 3.10 to not lose types: https://peps.python.org/pep-0612/.