Skip to content

Commit

Permalink
make pytest run the benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonw committed May 10, 2024
1 parent 1aeae0a commit ffb5b3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions benchmarks/benchmark_dep_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@

@pytest.mark.parametrize("test", ["iterate", "init"])
@pytest.mark.parametrize("size", ["small", "medium", "large"])
@pytest.mark.parametrize("block_gen", ["lazy", "enumerated"])
def benchmark_dep_graph(benchmark, test, size, block_gen):
def benchmark_dep_graph(benchmark, test, size):
task = tasks[size]
lazy = block_gen == "lazy"
iterate = test == "iterate"

def benchmark_scheduler(task, block_count):
scheduler = Scheduler([task], lazy=lazy)
scheduler = Scheduler([task])
for i in range(block_count):
block = scheduler.acquire_block(task.task_id)
assert block is not None, f"Failed to get the {i}'th block!"
Expand Down
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ filterwarnings =
ignore:::zarr
log_cli=false
log_level=DEBUG
testpaths = tests benchmarks
python_files = test_*.py benchmark_*.py
python_functions = test_* benchmark_*

0 comments on commit ffb5b3e

Please sign in to comment.