Skip to content

Commit 8c830b4

Browse files
committed
add asv benchmarks for nrows in read_json
1 parent b6a9499 commit 8c830b4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

asv_bench/benchmarks/io/json.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,24 @@ def time_read_json_lines(self, index):
5353
def time_read_json_lines_concat(self, index):
5454
concat(read_json(self.fname, orient="records", lines=True, chunksize=25000))
5555

56+
def time_read_json_lines_nrows(self, index):
57+
read_json(self.fname, orient="records", lines=True, nrows=15000)
58+
59+
def time_read_json_lines_nrows_larger(self, index):
60+
read_json(self.fname, orient="records", lines=True, nrows=45000)
61+
5662
def peakmem_read_json_lines(self, index):
5763
read_json(self.fname, orient="records", lines=True)
5864

5965
def peakmem_read_json_lines_concat(self, index):
6066
concat(read_json(self.fname, orient="records", lines=True, chunksize=25000))
6167

68+
def peakmem_read_json_lines_nrows(self, index):
69+
read_json(self.fname, orient="records", lines=True, nrows=15000)
70+
71+
def peakmem_read_json_lines_nrows_larger(self, index):
72+
read_json(self.fname, orient="records", lines=True, nrows=45000)
73+
6274

6375
class ToJSON(BaseIO):
6476

0 commit comments

Comments
 (0)