Skip to content

Commit

Permalink
TST: Add ASV benchmark for issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung committed Jan 20, 2019
1 parent e241796 commit 0c366a8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions asv_bench/benchmarks/io/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,23 @@ def time_baseline(self):
names=list(string.digits[:9]))


class ReadCSVMemoryGrowth(BaseIO):

chunksize = 20
num_rows = 1000
fname = "__test__.csv"

def setup(self):
with open(self.fname, "w") as f:
for i in range(self.num_rows):
f.write("{i}\n".format(i=i))

def mem_parser_chunks(self):
# see gh-24805.
result = read_csv(self.fname, chunksize=self.chunksize)

for _ in result:
pass


from ..pandas_vb_common import setup # noqa: F401

0 comments on commit 0c366a8

Please sign in to comment.