Skip to content

Commit 8dddbca

Browse files
authored
Add better ASV test cases for open_dataset (#8352)
* Add large amount of values and chunk with samll values * Update dataset_io.py
1 parent 9517b60 commit 8dddbca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

asv_bench/benchmarks/dataset_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def load(self) -> tuple:
593593
n_variables = 2000
594594

595595
# Important to have a shape and dtype for lazy loading.
596-
shape = (1,)
596+
shape = (1000,)
597597
dtype = np.dtype(int)
598598
variables = {
599599
f"long_variable_name_{v}": xr.Variable(
@@ -643,7 +643,7 @@ def open_dataset(
643643

644644
self.engine = PerformanceBackend
645645

646-
@parameterized(["chunks"], ([None, {}]))
646+
@parameterized(["chunks"], ([None, {}, {"time": 10}]))
647647
def time_open_dataset(self, chunks):
648648
"""
649649
Time how fast xr.open_dataset is without the slow data reading part.

0 commit comments

Comments
 (0)