Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cf5e0dc907 | |||
| 065c1abad0 | |||
| 1a7ea8cb87 | |||
| ef3ece9865 | |||
| 23a7f9e9a0 | |||
| 6742100c36 | |||
| e36dc52da3 | |||
| afcb84282d | |||
| f25d56a7ec | |||
| c428e8a8a0 | |||
| c00fc59c6b | |||
| 2d76363237 | |||
| 40039cd752 | |||
| b42a7326be | |||
| cf34a3e0bd | |||
| 3381aa8e21 | |||
| 3d5a279aea | |||
| ccc5465286 | |||
| 4dd7846971 | |||
| 4da5804939 | |||
| 47edf679b5 | |||
| b82f87df1f | |||
| e217951aec | |||
| f8e37907cb |
@@ -636,18 +636,19 @@ jobs:
|
|||||||
# ccache -s
|
# ccache -s
|
||||||
|
|
||||||
benchmarks:
|
benchmarks:
|
||||||
if: github.event_name == 'pull_request'
|
#if: github.event_name == 'pull_request'
|
||||||
# needs: [format-taginfo-docs]
|
#needs: [format-taginfo-docs]
|
||||||
runs-on: ubuntu-22.04
|
runs-on: self-hosted
|
||||||
env:
|
env:
|
||||||
CCOMPILER: clang-13
|
CCOMPILER: gcc-13
|
||||||
CXXCOMPILER: clang++-13
|
CXXCOMPILER: g++-13
|
||||||
CC: clang-13
|
CC: gcc-13
|
||||||
CXX: clang++-13
|
CXX: g++-13
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
|
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
|
||||||
|
CXXFLAGS: '-Wno-array-bounds -Wno-uninitialized'
|
||||||
steps:
|
steps:
|
||||||
- name: Enable data.osm.pbf cache
|
- name: Enable data.osm.pbf cache
|
||||||
if: ${{ ! env.RUN_BIG_BENCHMARK }}
|
if: ${{ ! env.RUN_BIG_BENCHMARK }}
|
||||||
@@ -678,8 +679,8 @@ jobs:
|
|||||||
path: pr
|
path: pr
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4"
|
python3 -m pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4" --break-system-packages
|
||||||
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: |
|
||||||
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
|
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
|
||||||
@@ -707,6 +708,7 @@ jobs:
|
|||||||
path: base
|
path: base
|
||||||
- name: Build Base Branch
|
- name: Build Base Branch
|
||||||
run: |
|
run: |
|
||||||
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
||||||
mkdir base/build
|
mkdir base/build
|
||||||
cd base/build
|
cd base/build
|
||||||
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||||
@@ -714,50 +716,57 @@ jobs:
|
|||||||
make -j$(nproc) benchmarks
|
make -j$(nproc) benchmarks
|
||||||
cd ..
|
cd ..
|
||||||
make -C test/data
|
make -C test/data
|
||||||
# - name: Build PR Branch
|
- name: Build PR Branch
|
||||||
# run: |
|
run: |
|
||||||
# mkdir -p pr/build
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
||||||
# cd pr/build
|
mkdir -p pr/build
|
||||||
# cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
cd pr/build
|
||||||
# make -j$(nproc)
|
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||||
# make -j$(nproc) benchmarks
|
make -j$(nproc)
|
||||||
# cd ..
|
make -j$(nproc) benchmarks
|
||||||
# make -C test/data
|
cd ..
|
||||||
|
make -C test/data
|
||||||
# we run benchmarks in tmpfs to avoid impact of disk IO
|
# we run benchmarks in tmpfs to avoid impact of disk IO
|
||||||
- name: Create folder for tmpfs
|
- name: Create folder for tmpfs
|
||||||
run: mkdir -p /opt/benchmarks
|
run: mkdir -p ~/benchmarks_tmp
|
||||||
# - name: Run PR Benchmarks
|
- name: Run PR Benchmarks
|
||||||
# run: |
|
run: |
|
||||||
# sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
||||||
# cp -rf pr/build /opt/benchmarks/build
|
sudo mount -t tmpfs -o size=4g none ~/benchmarks_tmp
|
||||||
# mkdir -p /opt/benchmarks/test
|
cp -rf pr/build ~/benchmarks_tmp/build
|
||||||
# cp -rf pr/test/data /opt/benchmarks/test/data
|
mkdir -p ~/benchmarks_tmp/test
|
||||||
# cp -rf pr/profiles /opt/benchmarks/profiles
|
cp -rf pr/test/data ~/benchmarks_tmp/test/data
|
||||||
|
cp -rf pr/profiles ~/benchmarks_tmp/profiles
|
||||||
|
|
||||||
# ./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks_tmp -r $(pwd)/pr_results -s $(pwd)/pr -b ~/benchmarks_tmp/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
||||||
# sudo umount /opt/benchmarks
|
sleep 10
|
||||||
|
# lsof ~/benchmarks_tmp
|
||||||
|
sudo umount ~/benchmarks_tmp
|
||||||
- name: Run Base Benchmarks
|
- name: Run Base Benchmarks
|
||||||
run: |
|
run: |
|
||||||
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
||||||
cp -rf base/build /opt/benchmarks/build
|
sudo mount -t tmpfs -o size=4g none ~/benchmarks_tmp
|
||||||
mkdir -p /opt/benchmarks/test
|
cp -rf pr/build ~/benchmarks_tmp/build
|
||||||
cp -rf base/test/data /opt/benchmarks/test/data
|
mkdir -p ~/benchmarks_tmp/test
|
||||||
cp -rf base/profiles /opt/benchmarks/profiles
|
cp -rf pr/test/data ~/benchmarks_tmp/test/data
|
||||||
|
cp -rf pr/profiles ~/benchmarks_tmp/profiles
|
||||||
|
|
||||||
# TODO: remove it when base branch will have this file at needed location
|
# TODO: remove it when base branch will have this file at needed location
|
||||||
if [ ! -f /opt/benchmarks/test/data/portugal_to_korea.json ]; then
|
if [ ! -f ~/benchmarks_tmp/test/data/portugal_to_korea.json ]; then
|
||||||
cp base/src/benchmarks/portugal_to_korea.json /opt/benchmarks/test/data/portugal_to_korea.json
|
cp base/src/benchmarks/portugal_to_korea.json ~/benchmarks_tmp/test/data/portugal_to_korea.json
|
||||||
fi
|
fi
|
||||||
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
|
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
|
||||||
./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks_tmp -r $(pwd)/base_results -s $(pwd)/pr -b ~/benchmarks_tmp/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
||||||
sudo umount /opt/benchmarks
|
sleep 10
|
||||||
# - name: Post Benchmark Results
|
# lsof ~/benchmarks_tmp
|
||||||
# run: |
|
sudo umount ~/benchmarks_tmp
|
||||||
# python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
- name: Post Benchmark Results
|
||||||
# - name: Show CCache statistics
|
run: |
|
||||||
# run: |
|
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
||||||
# ccache -p
|
- name: Show CCache statistics
|
||||||
# ccache -s
|
run: |
|
||||||
|
ccache -p
|
||||||
|
ccache -s
|
||||||
|
|
||||||
# ci-complete:
|
# ci-complete:
|
||||||
# runs-on: ubuntu-22.04
|
# runs-on: ubuntu-22.04
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eou pipefail
|
set -eou pipefail
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
echo "Usage: $0 -f <folder> -r <results_folder> -s <scripts_folder> -b <binaries_folder> -o <osm_pbf> -g <gps_traces>"
|
echo "Usage: $0 -f <folder> -r <results_folder> -s <scripts_folder> -b <binaries_folder> -o <osm_pbf> -g <gps_traces>"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -52,11 +54,17 @@ function measure_peak_ram_and_time {
|
|||||||
function run_benchmarks_for_folder {
|
function run_benchmarks_for_folder {
|
||||||
mkdir -p $RESULTS_FOLDER
|
mkdir -p $RESULTS_FOLDER
|
||||||
|
|
||||||
|
rm -rf $RESULTS_FOLDER/*
|
||||||
|
|
||||||
BENCHMARKS_FOLDER="$BINARIES_FOLDER/src/benchmarks"
|
BENCHMARKS_FOLDER="$BINARIES_FOLDER/src/benchmarks"
|
||||||
echo "Running match-bench MLD"
|
echo "Running match-bench MLD"
|
||||||
perf stat -r 1 $BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/mld/monaco.osrm" mld #> "$RESULTS_FOLDER/match_mld.bench"
|
perf stat -r 10 $BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/mld/monaco.osrm" mld &> "$RESULTS_FOLDER/match_mld.bench"
|
||||||
# echo "Running match-bench CH"
|
echo "Running match-bench CH"
|
||||||
# $BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/ch/monaco.osrm" ch > "$RESULTS_FOLDER/match_ch.bench"
|
perf stat -r 10 $BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/ch/monaco.osrm" ch &> "$RESULTS_FOLDER/match_ch.bench"
|
||||||
|
echo "Running match-bench MLD"
|
||||||
|
perf stat -r 10 $BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/mld/monaco.osrm" mld &> "$RESULTS_FOLDER/match_mld2.bench"
|
||||||
|
echo "Running match-bench CH"
|
||||||
|
perf stat -r 10 $BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/ch/monaco.osrm" ch &> "$RESULTS_FOLDER/match_ch2.bench"
|
||||||
# echo "Running route-bench MLD"
|
# echo "Running route-bench MLD"
|
||||||
# $BENCHMARKS_FOLDER/route-bench "$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/route_mld.bench"
|
# $BENCHMARKS_FOLDER/route-bench "$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/route_mld.bench"
|
||||||
# echo "Running route-bench CH"
|
# echo "Running route-bench CH"
|
||||||
|
|||||||
Reference in New Issue
Block a user