Skip to content

Commit

Permalink
TEST-#2699: add append benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev committed Feb 5, 2021
1 parent 77d40ce commit 6690644
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 @@ -225,6 +225,27 @@ def time_concat(self, shapes, how, axis):
raise NotImplementedError


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 6690644

Please sign in to comment.