From a52201695380704ac62487be289436d775df507f Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Wed, 26 Jun 2024 18:10:19 +0200 Subject: [PATCH] wip --- .github/workflows/osrm-backend.yml | 3 +-- include/util/query_heap.hpp | 2 -- scripts/ci/post_benchmark_results.py | 27 +++++++++++++-------------- scripts/ci/run_benchmarks.sh | 1 - 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index e1a7ad2c2..b6aa60802 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -682,7 +682,6 @@ jobs: sudo apt-get update -y && sudo apt-get install ccache - name: Prepare data run: | - echo "RUN BIG BENCHMARK: $RUN_BIG_BENCHMARK" if [ "$RUN_BIG_BENCHMARK" = "true" ]; then rm -rf ~/data.osm.pbf wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet @@ -754,7 +753,7 @@ jobs: sudo umount /opt/benchmarks - name: Post Benchmark Results run: | - python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results 1 + python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results - name: Show CCache statistics run: | ccache -p diff --git a/include/util/query_heap.hpp b/include/util/query_heap.hpp index dc7aac63f..cb0208020 100644 --- a/include/util/query_heap.hpp +++ b/include/util/query_heap.hpp @@ -33,8 +33,6 @@ template class ArrayStorage std::vector positions; }; -#define USE_ANKERL - template class UnorderedMapStorage { public: diff --git a/scripts/ci/post_benchmark_results.py b/scripts/ci/post_benchmark_results.py index 6fa06ad64..dc379a803 100644 --- a/scripts/ci/post_benchmark_results.py +++ b/scripts/ci/post_benchmark_results.py @@ -63,13 +63,12 @@ def collect_benchmark_results(base_folder, pr_folder): return results def main(): - if len(sys.argv) != 4: + if len(sys.argv) != 3: print("Usage: python post_benchmark_results.py ") exit(1) base_folder = sys.argv[1] pr_folder = sys.argv[2] - run_number = sys.argv[3] benchmark_results = collect_benchmark_results(base_folder, pr_folder) @@ -79,23 +78,23 @@ def main(): markdown_table = create_markdown_table(benchmark_results) new_benchmark_section = f""" - +

Benchmark Results

{markdown_table}
- + """ - # if re.search(r'.*', pr_body, re.DOTALL): - # updated_body = re.sub( - # r'.*', - # new_benchmark_section, - # pr_body, - # flags=re.DOTALL - # ) - # else: - updated_body = f"{pr_body}\n\n{new_benchmark_section}" if len(pr_body) > 0 else new_benchmark_section + if re.search(r'.*', pr_body, re.DOTALL): + updated_body = re.sub( + r'.*', + new_benchmark_section, + pr_body, + flags=re.DOTALL + ) + else: + updated_body = f"{pr_body}\n\n{new_benchmark_section}" if len(pr_body) > 0 else new_benchmark_section update_pr_description(REPO_OWNER, REPO_NAME, PR_NUMBER, updated_body) print("PR description updated successfully.") @@ -103,4 +102,4 @@ def main(): if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/scripts/ci/run_benchmarks.sh b/scripts/ci/run_benchmarks.sh index a70cabd84..0d0324d13 100755 --- a/scripts/ci/run_benchmarks.sh +++ b/scripts/ci/run_benchmarks.sh @@ -81,7 +81,6 @@ function run_benchmarks_for_folder { echo "Running osrm-contract" measure_peak_ram_and_time "$BINARIES_FOLDER/osrm-contract $FOLDER/data.osrm" "$RESULTS_FOLDER/osrm_contract.bench" - for ALGORITHM in ch mld; do for BENCH in nearest table trip route match; do echo "Running random $BENCH $ALGORITHM"