Skip to content

Commit

Permalink
Benchmark dataset slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarDrew committed Jun 6, 2024
1 parent 78eb098 commit 19d80e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dkist/tests/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@ def test_raveled_tab1d_model(benchmark):
inputs = tuple(raw_inputs * units)

benchmark(raveled_tab, *inputs)


@pytest.mark.benchmark
def test_slice_dataset(benchmark, large_visp_dataset):
@benchmark
def slice_dataset(dataset=large_visp_dataset, idx = np.s_[:2, 10:15, 0]):
sliced = dataset[idx]

0 comments on commit 19d80e5

Please sign in to comment.