import time


rule all:
    input:
        "test.benchmark_shell.txt",
        "test.benchmark_script.txt",
        "test.benchmark_run.txt",
        "test.benchmark_run_shell.txt",


rule bench_shell:
    benchmark:
        repeat("test.benchmark_shell.txt", 2)
    threads: 2
    shell:
        "stress --cpu {threads} --timeout 10"


rule bench_script:
    benchmark:
        "test.benchmark_script.txt"
    script: 'script.py'


rule bench_run:
    benchmark:
        "test.benchmark_run.txt"
    run:
        time.sleep(1)

rule bench_run_shell:
    benchmark:
        "test.benchmark_run_shell.txt"
    run:
        shell("sleep 1")
