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
isNone
then the PID of the current process will be used. Ifbenchmark_record
isNone
then a newBenchmarkRecord
is created and returned, otherwise, the object passed as this parameter is returned.Usage:
with benchmarked() as bench_result: pass