This commit is contained in:
Siarhei Fedartsou 2024-06-26 18:10:19 +02:00
parent 6f444be1de
commit a522016953
4 changed files with 14 additions and 19 deletions

View File

@ -682,7 +682,6 @@ jobs:
sudo apt-get update -y && sudo apt-get install ccache sudo apt-get update -y && sudo apt-get install ccache
- name: Prepare data - name: Prepare data
run: | run: |
echo "RUN BIG BENCHMARK: $RUN_BIG_BENCHMARK"
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
rm -rf ~/data.osm.pbf rm -rf ~/data.osm.pbf
wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet
@ -754,7 +753,7 @@ jobs:
sudo umount /opt/benchmarks sudo umount /opt/benchmarks
- name: Post Benchmark Results - name: Post Benchmark Results
run: | 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 - name: Show CCache statistics
run: | run: |
ccache -p ccache -p

View File

@ -33,8 +33,6 @@ template <typename NodeID, typename Key> class ArrayStorage
std::vector<Key> positions; std::vector<Key> positions;
}; };
#define USE_ANKERL
template <typename NodeID, typename Key> class UnorderedMapStorage template <typename NodeID, typename Key> class UnorderedMapStorage
{ {
public: public:

View File

@ -63,13 +63,12 @@ def collect_benchmark_results(base_folder, pr_folder):
return results return results
def main(): def main():
if len(sys.argv) != 4: 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>")
exit(1) exit(1)
base_folder = sys.argv[1] base_folder = sys.argv[1]
pr_folder = sys.argv[2] pr_folder = sys.argv[2]
run_number = sys.argv[3]
benchmark_results = collect_benchmark_results(base_folder, pr_folder) benchmark_results = collect_benchmark_results(base_folder, pr_folder)
@ -79,22 +78,22 @@ def main():
markdown_table = create_markdown_table(benchmark_results) markdown_table = create_markdown_table(benchmark_results)
new_benchmark_section = f""" new_benchmark_section = f"""
<!-- BENCHMARK_RESULTS_START {run_number} --> <!-- BENCHMARK_RESULTS_START -->
<details><summary><h2>Benchmark Results</h2></summary> <details><summary><h2>Benchmark Results</h2></summary>
{markdown_table} {markdown_table}
</details> </details>
<!-- BENCHMARK_RESULTS_END {run_number} --> <!-- 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(
# r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->', r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->',
# new_benchmark_section, new_benchmark_section,
# pr_body, pr_body,
# flags=re.DOTALL flags=re.DOTALL
# ) )
# else: else:
updated_body = f"{pr_body}\n\n{new_benchmark_section}" if len(pr_body) > 0 else new_benchmark_section 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) update_pr_description(REPO_OWNER, REPO_NAME, PR_NUMBER, updated_body)

View File

@ -81,7 +81,6 @@ function run_benchmarks_for_folder {
echo "Running osrm-contract" echo "Running osrm-contract"
measure_peak_ram_and_time "$BINARIES_FOLDER/osrm-contract $FOLDER/data.osrm" "$RESULTS_FOLDER/osrm_contract.bench" measure_peak_ram_and_time "$BINARIES_FOLDER/osrm-contract $FOLDER/data.osrm" "$RESULTS_FOLDER/osrm_contract.bench"
for ALGORITHM in ch mld; do for ALGORITHM in ch mld; do
for BENCH in nearest table trip route match; do for BENCH in nearest table trip route match; do
echo "Running random $BENCH $ALGORITHM" echo "Running random $BENCH $ALGORITHM"