Skip to content

Commit

Permalink
TEST-#2699: add append benchmark (#2700)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev authored Feb 8, 2021
1 parent 3a31683 commit 7525f05
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions asv_bench/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,27 @@ def time_concat(self, shapes, how, axis):
execute(IMPL[ASV_USE_IMPL].concat([self.df1, self.df2], axis=axis, join=how))


class TimeAppend:
param_names = ["shapes", "sort"]
params = [
BINARY_OP_DATA_SIZE[ASV_DATASET_SIZE],
[False, True],
]

def setup(self, shapes, sort):
self.df1 = generate_dataframe(
ASV_USE_IMPL, "int", *shapes[0], RAND_LOW, RAND_HIGH
)
self.df2 = generate_dataframe(
ASV_USE_IMPL, "int", *shapes[1], RAND_LOW, RAND_HIGH
)
if sort:
self.df1.columns = self.df1.columns[::-1]

def time_append(self, shapes, sort):
execute(self.df1.append(self.df2, sort=sort))


class TimeBinaryOp:
param_names = ["shapes", "binary_op", "axis"]
params = [
Expand Down

0 comments on commit 7525f05

Please sign in to comment.