This commit is contained in:
Siarhei Fedartsou 2024-05-27 22:20:41 +02:00
parent a5ede15b1b
commit 1bf5c018e3
3 changed files with 8 additions and 3 deletions

View File

@ -77,7 +77,12 @@ def main():
pr_body = pr_details.get('body', '') or '' pr_body = pr_details.get('body', '') or ''
markdown_table = create_markdown_table(benchmark_results) markdown_table = create_markdown_table(benchmark_results)
new_benchmark_section = f"<!-- BENCHMARK_RESULTS_START -->\n## Benchmark Results\n{markdown_table}\n<!-- BENCHMARK_RESULTS_END -->" new_benchmark_section = f"""
<!-- BENCHMARK_RESULTS_START -->
<details><summary>Benchmark Results</summary>
{markdown_table}
</details>
<!-- BENCHMARK_RESULTS_END -->"
if re.search(r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->', pr_body, re.DOTALL): if re.search(r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->', pr_body, re.DOTALL):
updated_body = re.sub( updated_body = re.sub(

View File

@ -22,7 +22,7 @@ avg: {float(row['Average Response Time']):.3f}ms
min: {float(row['Min Response Time']):.3f}ms min: {float(row['Min Response Time']):.3f}ms
max: {float(row['Max Response Time']):.3f}ms max: {float(row['Max Response Time']):.3f}ms
''' '''
with open(f"{output_folder}/{name}_{suffix}.bench", 'w') as f: with open(f"{output_folder}/e2e_{name}_{suffix}.bench", 'w') as f:
f.write(statistics) f.write(statistics)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -45,7 +45,7 @@ function run_benchmarks_for_folder {
--csv=locust_results_$ALGORITHM \ --csv=locust_results_$ALGORITHM \
--loglevel ERROR || true --loglevel ERROR || true
python3 $FOLDER/scripts/ci/process_locust_benchmark_results.py locust_results_$ALGORITHM e2e_$ALGORITHM $RESULTS_FOLDER python3 $FOLDER/scripts/ci/process_locust_benchmark_results.py locust_results_$ALGORITHM $ALGORITHM $RESULTS_FOLDER
kill -0 $OSRM_ROUTED_PID kill -0 $OSRM_ROUTED_PID