Skip to content

Commit 4709208

Browse files
committed
TST: Improved fixed window rolling min/max benchmark
1 parent d421a7a commit 4709208

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

asv_bench/benchmarks/rolling.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,16 @@ def time_quantile(self, constructor, window, dtype, percentile, interpolation):
150150
self.roll.quantile(percentile, interpolation=interpolation)
151151

152152

153-
class PeakMemFixed:
153+
class PeakMemFixedWindowMinMax:
154154
def setup(self):
155-
N = 10
155+
N = int(1e5)
156156
arr = 100 * np.random.random(N)
157-
self.roll = pd.Series(arr).rolling(10)
157+
self.roll = pd.Series(arr).rolling(1000)
158158

159159
def peakmem_fixed(self):
160-
# GH 25926
161-
# This is to detect memory leaks in rolling operations.
162-
# To save time this is only ran on one method.
163-
# 6000 iterations is enough for most types of leaks to be detected
164-
for x in range(6000):
160+
# GH 33693
161+
# increased size of array so we see a clearer picture
162+
for x in range(1000):
165163
self.roll.max()
166164

167165

0 commit comments

Comments
 (0)