Skip to content

Commit 0834906

Browse files
committed
fix assets renaming
1 parent f332f29 commit 0834906

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

assets/clickhouse/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"""
1414

1515
CLICKHOUSE_COLLECTION_NAME = "clickhouse_bench"
16-
class clickhouse_native_json_bench(Benchmark):
16+
class clickhouse_bench(Benchmark):
1717
# add any parameters to the tool here
1818
def __init__(self, dataset, manual_column_names=True, keys=[], additional_order_by=[], timestamp_key=False):
1919
super().__init__(dataset)
@@ -154,7 +154,7 @@ def run_applicable(self, dataset_name):
154154

155155

156156
def main():
157-
bench = clickhouse_native_json_bench(sys.argv[1])
157+
bench = clickhouse_bench(sys.argv[1])
158158
bench.run_everything()
159159

160160
if __name__ == "__main__":

assets/clp/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
CLP_OUT_PATH = f"{WORK_DIR}/archives"
77
CLP_S_BINARY = "/clp/clp-s"
8-
class clp_s_bench(Benchmark):
8+
class clp_bench(Benchmark):
99
def __init__(self, dataset, target_encoded_size=268435456):
1010
super().__init__(dataset)
1111

@@ -61,7 +61,7 @@ def terminate_procs(self):
6161

6262

6363
def main():
64-
bench = clp_s_bench(sys.argv[1])
64+
bench = clp_bench(sys.argv[1])
6565
bench.run_everything()
6666

6767
if __name__ == "__main__":

assets/presto_clp/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
CLP_PRESTO_HOST_STORAGE = os.path.abspath(os.path.expanduser("~/clp-json-x86_64-v0.4.0-dev"))
1717
SQL_PASSWORD = "wqEGPyBdx_w"
1818
HOST_IP = "127.0.0.1"
19-
class clp_presto_bench(Benchmark):
19+
class presto_clp_bench(Benchmark):
2020
# add any parameters to the tool here
2121
def __init__(self, dataset, dataset_variation='cleaned_log'):
2222
super().__init__(dataset, dataset_variation=dataset_variation)
@@ -102,7 +102,7 @@ def terminate(self):
102102

103103

104104
def main():
105-
bench = clp_presto_bench(sys.argv[1])
105+
bench = presto_clp_bench(sys.argv[1])
106106
bench.run_everything()
107107

108108
if __name__ == "__main__":

scripts/benchall.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env python3
22

3-
from assets.clp_s.main import clp_s_bench
4-
from assets.clickhouse_native_json.main import clickhouse_native_json_bench
3+
from assets.clp.main import clp_bench
4+
from assets.clickhouse.main import clickhouse_bench
55
from assets.sparksql.main import sparksql_bench
6-
from assets.parquet.main import parquet_bench
6+
from assets.presto_parquet.main import parquet_bench
77
from assets.zstandard.main import zstandard_bench
88
from assets.elasticsearch.main import elasticsearch_bench
9-
from assets.clp_presto.main import clp_presto_bench
9+
from assets.presto_clp.main import presto_clp_bench
1010
from assets.overhead_test.main import overhead_test_bench
1111
from assets.gzip.main import gzip_bench
1212
from src.jsonsync import JsonItem
@@ -33,14 +33,14 @@ def get_target_from_name(name):
3333

3434

3535
benchmarks = [ # benchmark object, arguments
36-
(clp_s_bench, {}),
37-
(clickhouse_native_json_bench, {
36+
(clp_bench, {}),
37+
(clickhouse_bench, {
3838
'manual_column_names': False,
3939
'keys': [],
4040
'additional_order_by': [],
4141
'timestamp_key': True
4242
}),
43-
(clp_presto_bench, {
43+
(presto_clp_bench, {
4444
'dataset_variation': "cleaned_log"
4545
}),
4646
(parquet_bench, {'mode': 'json string'}),
@@ -52,7 +52,7 @@ def get_target_from_name(name):
5252
(gzip_bench, {}),
5353
]
5454

55-
def run(bencher, kwargs, bench_target, attach=False):
55+
def run(bencher, kwargs, bench_target, attach=False, attach_on_error=False):
5656
dataset_name = 'error when finding dataset name'
5757
bench = None
5858
try:
@@ -70,7 +70,7 @@ def run(bencher, kwargs, bench_target, attach=False):
7070
with open((current_dir / 'exceptions.log').resolve(), 'a') as file:
7171
file.write(f"{statement}\n")
7272
print(statement)
73-
if attach:
73+
if attach or attach_on_error:
7474
if bench is not None:
7575
bench.docker_attach()
7676
else:
@@ -80,9 +80,10 @@ def run(bencher, kwargs, bench_target, attach=False):
8080
for bench_target in bench_target_dirs:
8181
dataset_name = os.path.basename(bench_target.resolve()).strip()
8282

83-
#if dataset_name != 'mongod': # only use mongod for now
84-
# continue
85-
run(bencher, kwargs, bench_target)
83+
if dataset_name != 'mongod': # only use mongod for now
84+
continue
85+
#run(bencher, kwargs, bench_target)
86+
run(bencher, kwargs, bench_target, attach_on_error=True)
8687
#run(bencher, kwargs, bench_target, attach=True)
8788

8889
#run(sparksql_bench, {}, get_target_from_name('mongod'))

0 commit comments

Comments
 (0)