This commit is contained in:
Siarhei Fedartsou 2024-05-26 21:28:49 +02:00
parent ba4f9be0fa
commit cf8d479782
2 changed files with 26 additions and 25 deletions

View File

@ -650,7 +650,7 @@ jobs:
- name: Prepare data - name: Prepare data
run: | run: |
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -O ~/data.osm.pbf wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -O ~/data.osm.pbf
python3 ./pr/scripts/ci/download_gps_traces.py 13.0884 52.3383 13.7611 52.6755 > ~/gps_traces.csv python3 ./pr/scripts/ci/download_gps_traces.py 13.1884 52.3883 13.6611 52.6255 > ~/gps_traces.csv
- name: Build PR Branch - name: Build PR Branch
run: | run: |
mkdir -p pr/build mkdir -p pr/build

View File

@ -12,15 +12,14 @@ function run_benchmarks_for_folder {
BENCHMARKS_FOLDER="$FOLDER/build/src/benchmarks" BENCHMARKS_FOLDER="$FOLDER/build/src/benchmarks"
./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/match_mld.bench" ./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/match_mld.bench"
# ./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/ch/monaco.osrm" ch > "$RESULTS_FOLDER/match_ch.bench" ./$BENCHMARKS_FOLDER/match-bench "./$FOLDER/test/data/ch/monaco.osrm" ch > "$RESULTS_FOLDER/match_ch.bench"
# ./$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"
# ./$BENCHMARKS_FOLDER/route-bench "./$FOLDER/test/data/ch/monaco.osrm" ch > "$RESULTS_FOLDER/route_ch.bench" ./$BENCHMARKS_FOLDER/route-bench "./$FOLDER/test/data/ch/monaco.osrm" ch > "$RESULTS_FOLDER/route_ch.bench"
# ./$BENCHMARKS_FOLDER/alias-bench > "$RESULTS_FOLDER/alias.bench" ./$BENCHMARKS_FOLDER/alias-bench > "$RESULTS_FOLDER/alias.bench"
# ./$BENCHMARKS_FOLDER/json-render-bench "./$FOLDER/src/benchmarks/portugal_to_korea.json" > "$RESULTS_FOLDER/json-render.bench" ./$BENCHMARKS_FOLDER/json-render-bench "./$FOLDER/src/benchmarks/portugal_to_korea.json" > "$RESULTS_FOLDER/json-render.bench"
# ./$BENCHMARKS_FOLDER/packedvector-bench > "$RESULTS_FOLDER/packedvector.bench" ./$BENCHMARKS_FOLDER/packedvector-bench > "$RESULTS_FOLDER/packedvector.bench"
# ./$BENCHMARKS_FOLDER/rtree-bench "./$FOLDER/test/data/monaco.osrm.ramIndex" "./$FOLDER/test/data/monaco.osrm.fileIndex" "./$FOLDER/test/data/monaco.osrm.nbg_nodes" > "$RESULTS_FOLDER/rtree.bench" ./$BENCHMARKS_FOLDER/rtree-bench "./$FOLDER/test/data/monaco.osrm.ramIndex" "./$FOLDER/test/data/monaco.osrm.fileIndex" "./$FOLDER/test/data/monaco.osrm.nbg_nodes" > "$RESULTS_FOLDER/rtree.bench"
# TODO: CH
BINARIES_FOLDER="$FOLDER/build" BINARIES_FOLDER="$FOLDER/build"
echo "PWD: $FOLDER" echo "PWD: $FOLDER"
cp ~/data.osm.pbf $FOLDER cp ~/data.osm.pbf $FOLDER
@ -29,9 +28,9 @@ function run_benchmarks_for_folder {
$BINARIES_FOLDER/osrm-customize $FOLDER/data.osrm $BINARIES_FOLDER/osrm-customize $FOLDER/data.osrm
$BINARIES_FOLDER/osrm-contract $FOLDER/data.osrm $BINARIES_FOLDER/osrm-contract $FOLDER/data.osrm
# TODO: save results
if [ -f "$FOLDER/scripts/ci/locustfile.py" ]; then if [ -f "$FOLDER/scripts/ci/locustfile.py" ]; then
$BINARIES_FOLDER/osrm-routed --algorithm mld $FOLDER/data.osrm & for ALGORITHM in mld ch; do
$BINARIES_FOLDER/osrm-routed --algorithm $ALGORITHM $FOLDER/data.osrm &
OSRM_ROUTED_PID=$! OSRM_ROUTED_PID=$!
# wait for osrm-routed to start # wait for osrm-routed to start
@ -43,14 +42,16 @@ function run_benchmarks_for_folder {
--spawn-rate 1 \ --spawn-rate 1 \
--host http://localhost:5000 \ --host http://localhost:5000 \
--run-time 1m \ --run-time 1m \
--csv=locust_results \ --csv=locust_results_$ALGORITHM \
--loglevel ERROR --loglevel ERROR || true
python3 $FOLDER/scripts/ci/process_locust_benchmark_results.py locust_results mld $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
done
fi fi
} }
run_benchmarks_for_folder $1 "${1}_results" run_benchmarks_for_folder $1 "${1}_results"