Add benchmarks comparison job
This commit is contained in:
parent
ffe6f17380
commit
36cddba728
4
.github/workflows/osrm-backend.yml
vendored
4
.github/workflows/osrm-backend.yml
vendored
@ -658,10 +658,6 @@ jobs:
|
|||||||
- name: Run Benchmarks
|
- name: Run Benchmarks
|
||||||
run: |
|
run: |
|
||||||
./pr/scripts/ci/run_benchmarks.sh base pr
|
./pr/scripts/ci/run_benchmarks.sh base pr
|
||||||
- name: Compare Benchmarks
|
|
||||||
run: |
|
|
||||||
cat pr_results/match_mld.bench
|
|
||||||
cat base_results/match_mld.bench
|
|
||||||
- name: Post Benchmark Results
|
- name: Post Benchmark Results
|
||||||
run: |
|
run: |
|
||||||
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
||||||
|
@ -36,6 +36,7 @@ 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()
|
||||||
@ -43,6 +44,7 @@ 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()
|
||||||
@ -51,6 +53,8 @@ def collect_benchmark_results(base_folder, pr_folder):
|
|||||||
else:
|
else:
|
||||||
results.append({'base': None, 'pr': result, 'name': os.path.splitext(file)[0]})
|
results.append({'base': None, 'pr': result, 'name': os.path.splitext(file)[0]})
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) != 3:
|
if len(sys.argv) != 3:
|
||||||
print("Usage: python post_benchmark_results.py <base_folder> <pr_folder>")
|
print("Usage: python post_benchmark_results.py <base_folder> <pr_folder>")
|
||||||
|
Loading…
Reference in New Issue
Block a user