snakemake.benchmark.benchmarked

snakemake.benchmark.benchmarked(pid=None, benchmark_record=None, interval=30)[source]

Measure benchmark parameters while within the context manager

Yields a BenchmarkRecord with the results (values are set after leaving context).

If pid is None then the PID of the current process will be used. If benchmark_record is None then a new BenchmarkRecord is created and returned, otherwise, the object passed as this parameter is returned.

Usage:

with benchmarked() as bench_result:
    pass