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
- 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

View File

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

View File

@ -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 <base_folder> <pr_folder>")
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_START {run_number} -->
<!-- BENCHMARK_RESULTS_START -->
<details><summary><h2>Benchmark Results</h2></summary>
{markdown_table}
</details>
<!-- BENCHMARK_RESULTS_END {run_number} -->
<!-- BENCHMARK_RESULTS_END -->
"""
# if re.search(r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->', pr_body, re.DOTALL):
# updated_body = re.sub(
# r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->',
# 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'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->', pr_body, re.DOTALL):
updated_body = re.sub(
r'<!-- BENCHMARK_RESULTS_START -->.*<!-- BENCHMARK_RESULTS_END -->',
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()

View File

@ -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"