Skip to content

Commit c15bd60

Browse files
committed
Add benchmarks for sharded + local store indexing
Parameterize with shards and no shards. Parameterize with local + memory store to have an example of a store which has some modest latency.
1 parent c06923d commit c15bd60

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

tests/benchmarks/test_indexing.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,27 @@
2222
(slice(None), slice(0, 3, 2), slice(0, 10)),
2323
)
2424

25+
shards = (
26+
None,
27+
(50,) * 3,
28+
)
29+
2530

26-
@pytest.mark.parametrize("store", ["memory"], indirect=["store"])
31+
@pytest.mark.parametrize("store", ["memory", "local"], indirect=["store"])
2732
@pytest.mark.parametrize("indexer", indexers, ids=str)
33+
@pytest.mark.parametrize("shards", shards, ids=str)
2834
def test_slice_indexing(
29-
store: Store, indexer: tuple[int | slice], benchmark: BenchmarkFixture
35+
store: Store,
36+
indexer: tuple[int | slice],
37+
shards: tuple[int, ...] | None,
38+
benchmark: BenchmarkFixture,
3039
) -> None:
3140
data = create_array(
3241
store=store,
3342
shape=(105,) * 3,
3443
dtype="uint8",
3544
chunks=(10,) * 3,
36-
shards=None,
45+
shards=shards,
3746
compressors=None,
3847
filters=None,
3948
fill_value=0,

0 commit comments

Comments
 (0)