def bench(session, benchmark):
    """
    Run a performance benchmark.
    """
    session.install("pyperf", f"{ROOT}[format]")
    tmpdir = Path(session.create_tmp())
    output = tmpdir / f"bench-{benchmark}.json"
    session.run("python", BENCHMARKS / f"{benchmark}.py", "--output", output)
Run a performance benchmark.
noxfile.py