Skip to content

Commit ee479e7

Browse files
committed
Update benchmarks
1 parent c747465 commit ee479e7

4 files changed

Lines changed: 78 additions & 0 deletions

File tree

python/perspective/bench/runtime/bench.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,71 @@
3838
"benchmark-python.arrow",
3939
)
4040

41+
BASELINE = {
42+
"name": [
43+
"arrow",
44+
"csv",
45+
"one",
46+
"one_1_pivot",
47+
"one_2_pivot",
48+
"to_arrow",
49+
"to_arrow_r1",
50+
"to_arrow_r1_c1",
51+
"to_arrow_r2",
52+
"to_arrow_r2_c2",
53+
"to_columns",
54+
"to_columns_r1",
55+
"to_columns_r1_c1",
56+
"to_columns_r2",
57+
"to_columns_r2_c2",
58+
"to_csv",
59+
"to_csv_r1",
60+
"to_csv_r1_c1",
61+
"to_csv_r2",
62+
"to_csv_r2_c2",
63+
"to_records",
64+
"to_records_r1",
65+
"to_records_r1_c1",
66+
"to_records_r2",
67+
"to_records_r2_c2",
68+
"two",
69+
"two_1x1_pivot",
70+
"two_2x2_pivot",
71+
"zero",
72+
],
73+
"time": [
74+
0.007100801400002865,
75+
0.2905632236999963,
76+
0.31363245369999504,
77+
0.5827624402000027,
78+
0.5723526209999988,
79+
0.3929776023999921,
80+
0.00021701669998037688,
81+
0.005837792799991348,
82+
0.0012358780999875308,
83+
0.06712399980000328,
84+
1.5685727534000022,
85+
0.00040022939999744266,
86+
0.007451989500009404,
87+
0.0027319223000063174,
88+
0.08117095989999826,
89+
0.5763108057000068,
90+
0.0003611342000112927,
91+
0.008143171199992593,
92+
0.0019054690000075425,
93+
0.07623720379999668,
94+
2.040859387900002,
95+
0.00047493509999867455,
96+
0.008475803500004986,
97+
0.0036788466000075458,
98+
0.09640174390000311,
99+
1.1455542396000056,
100+
1.9211396786000023,
101+
1.9244194315999947,
102+
0.10238117819999956,
103+
],
104+
}
105+
41106

42107
class VirtualEnvHandler(object):
43108
"""Creates and manages a virtualenv for benchmarking, which allows for
@@ -248,6 +313,7 @@ def run_method(self, func, *args, **kwargs):
248313

249314
result = timeit(func, number=Runner.ITERATIONS) / Runner.ITERATIONS
250315
overall_result["__TIME__"] = result
316+
overall_result["baseline"] = BASELINE["time"][BASELINE["name"].index(overall_result["name"])]
251317
return overall_result
252318

253319
def print_result(self, result):

python/perspective/bench/runtime/run_perspective_benchmark.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"""Benchmark the `perspective-python` runtime locally."""
2020
VERSIONS = [
2121
"master",
22+
"2.7.0",
23+
"2.6.0",
24+
"2.5.0",
2225
"2.4.0",
2326
"2.3.2",
2427
"2.3.1",

tools/perspective-bench/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"microtime": "^3.0.0"
2323
},
2424
"dependencies": {
25+
"perspective-2-7-0": "npm:@finos/perspective@2.7.0",
2526
"perspective-2-6-0": "npm:@finos/perspective@2.6.0",
2627
"perspective-2-5-0": "npm:@finos/perspective@2.5.0",
2728
"perspective-2-4-0": "npm:@finos/perspective@2.4.0",

tools/perspective-bench/yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,14 @@ papaparse@^5.2.0:
351351
stoppable "1.1.0"
352352
ws "^6.1.2"
353353

354+
"perspective-2-7-0@npm:@finos/perspective@2.7.0":
355+
version "2.7.0"
356+
resolved "https://registry.yarnpkg.com/@finos/perspective/-/perspective-2.7.0.tgz#8a99a070cd679bce721c96cf5d188d1ff7c60395"
357+
integrity sha512-/9UHAnH1iW8ANnfplDLGMS60dx3R8UWRoL0dKTx9A3jNbeP2l+5wd0twsal00FqR/wgUomd3+tbbkzOIMsNclA==
358+
dependencies:
359+
stoppable "1.1.0"
360+
ws "^6.1.2"
361+
354362
rc4@~0.1.5:
355363
version "0.1.5"
356364
resolved "https://registry.yarnpkg.com/rc4/-/rc4-0.1.5.tgz#08c6e04a0168f6eb621c22ab6cb1151bd9f4a64d"

0 commit comments

Comments
 (0)