Skip to content

Commit 0c366a8

Browse files
committed
TST: Add ASV benchmark for issue
1 parent e241796 commit 0c366a8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

asv_bench/benchmarks/io/csv.py

+19
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,23 @@ def time_baseline(self):
214214
names=list(string.digits[:9]))
215215

216216

217+
class ReadCSVMemoryGrowth(BaseIO):
218+
219+
chunksize = 20
220+
num_rows = 1000
221+
fname = "__test__.csv"
222+
223+
def setup(self):
224+
with open(self.fname, "w") as f:
225+
for i in range(self.num_rows):
226+
f.write("{i}\n".format(i=i))
227+
228+
def mem_parser_chunks(self):
229+
# see gh-24805.
230+
result = read_csv(self.fname, chunksize=self.chunksize)
231+
232+
for _ in result:
233+
pass
234+
235+
217236
from ..pandas_vb_common import setup # noqa: F401

0 commit comments

Comments
 (0)