Add benchmarks comparison job

This commit is contained in:
Siarhei Fedartsou 2024-05-11 22:10:38 +02:00
parent f3f3a80e6d
commit ea27068e99
2 changed files with 1 additions and 5 deletions

View File

@ -43,7 +43,6 @@ def collect_benchmark_results(base_folder, pr_folder):
results_index = {} results_index = {}
for file in os.listdir(base_folder): for file in os.listdir(base_folder):
print('base file:', file)
if not file.endswith('.bench'): continue if not file.endswith('.bench'): continue
with open(f"{base_folder}/{file}") as f: with open(f"{base_folder}/{file}") as f:
result = f.read().strip() result = f.read().strip()
@ -51,7 +50,6 @@ def collect_benchmark_results(base_folder, pr_folder):
results_index[file] = len(results) - 1 results_index[file] = len(results) - 1
for file in os.listdir(pr_folder): for file in os.listdir(pr_folder):
print('pr file:', file)
if not file.endswith('.bench'): continue if not file.endswith('.bench'): continue
with open(f"{pr_folder}/{file}") as f: with open(f"{pr_folder}/{file}") as f:
result = f.read().strip() result = f.read().strip()
@ -72,8 +70,6 @@ def main():
benchmark_results = collect_benchmark_results(base_folder, pr_folder) benchmark_results = collect_benchmark_results(base_folder, pr_folder)
print(json.dumps(benchmark_results, indent=2))
pr_details = get_pr_details(REPO_OWNER, REPO_NAME, PR_NUMBER) pr_details = get_pr_details(REPO_OWNER, REPO_NAME, PR_NUMBER)
pr_body = pr_details.get('body', '') pr_body = pr_details.get('body', '')

View File

@ -12,7 +12,7 @@ function run_benchmarks_for_folder {
BENCHMARKS_FOLDER="$FOLDER/build/src/benchmarks" BENCHMARKS_FOLDER="$FOLDER/build/src/benchmarks"
./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/match_mld.bench" ./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/match_mld.bench"
./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/ch/monaco.osrm" > "$RESULTS_FOLDER/match_ch.bench" ./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/ch/monaco.osrm" ch > "$RESULTS_FOLDER/match_ch.bench"
./$BENCHMARKS_FOLDER/alias-bench > "$RESULTS_FOLDER/alias.bench" ./$BENCHMARKS_FOLDER/alias-bench > "$RESULTS_FOLDER/alias.bench"
./$BENCHMARKS_FOLDER/json-render-bench "./$FOLDER/src/benchmarks/portugal_to_korea.json" > "$RESULTS_FOLDER/json-render.bench" ./$BENCHMARKS_FOLDER/json-render-bench "./$FOLDER/src/benchmarks/portugal_to_korea.json" > "$RESULTS_FOLDER/json-render.bench"
./$BENCHMARKS_FOLDER/packedvector-bench > "$RESULTS_FOLDER/packedvector.bench" ./$BENCHMARKS_FOLDER/packedvector-bench > "$RESULTS_FOLDER/packedvector.bench"