Use tmpfs for running benchmarks (#6966)
This commit is contained in:
parent
7d72dfebf7
commit
5a48ce85b3
26
.github/workflows/osrm-backend.yml
vendored
26
.github/workflows/osrm-backend.yml
vendored
@ -723,14 +723,34 @@ jobs:
|
|||||||
make -j$(nproc) benchmarks
|
make -j$(nproc) benchmarks
|
||||||
cd ..
|
cd ..
|
||||||
make -C test/data
|
make -C test/data
|
||||||
|
# we run benchmarks in tmpfs to avoid impact of disk IO
|
||||||
|
- name: Create folder for tmpfs
|
||||||
|
run: mkdir -p /opt/benchmarks
|
||||||
- name: Run PR Benchmarks
|
- name: Run PR Benchmarks
|
||||||
run: |
|
run: |
|
||||||
./pr/scripts/ci/run_benchmarks.sh -f $(pwd)/pr -r $(pwd)/pr_results -s $(pwd)/pr -b $(pwd)/pr/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
||||||
|
cp -rf pr/build /opt/benchmarks/build
|
||||||
|
mkdir -p /opt/benchmarks/test
|
||||||
|
cp -rf pr/test/data /opt/benchmarks/test/data
|
||||||
|
cp -rf pr/profiles /opt/benchmarks/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 umount /opt/benchmarks
|
||||||
- name: Run Base Benchmarks
|
- name: Run Base Benchmarks
|
||||||
run: |
|
run: |
|
||||||
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
|
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
||||||
./pr/scripts/ci/run_benchmarks.sh -f $(pwd)/base -r $(pwd)/base_results -s $(pwd)/pr -b $(pwd)/base/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
cp -rf base/build /opt/benchmarks/build
|
||||||
|
mkdir -p /opt/benchmarks/test
|
||||||
|
cp -rf base/test/data /opt/benchmarks/test/data
|
||||||
|
cp -rf base/profiles /opt/benchmarks/profiles
|
||||||
|
|
||||||
|
# TODO: remove it when base branch will have this file at needed location
|
||||||
|
if [ ! -f /opt/benchmarks/test/data/portugal_to_korea.json ]; then
|
||||||
|
cp base/src/benchmarks/portugal_to_korea.json /opt/benchmarks/test/data/portugal_to_korea.json
|
||||||
|
fi
|
||||||
|
# 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 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
|
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
||||||
|
@ -64,7 +64,7 @@ function run_benchmarks_for_folder {
|
|||||||
echo "Running alias"
|
echo "Running alias"
|
||||||
$BENCHMARKS_FOLDER/alias-bench > "$RESULTS_FOLDER/alias.bench"
|
$BENCHMARKS_FOLDER/alias-bench > "$RESULTS_FOLDER/alias.bench"
|
||||||
echo "Running json-render-bench"
|
echo "Running json-render-bench"
|
||||||
$BENCHMARKS_FOLDER/json-render-bench "$FOLDER/src/benchmarks/portugal_to_korea.json" > "$RESULTS_FOLDER/json-render.bench"
|
$BENCHMARKS_FOLDER/json-render-bench "$FOLDER/test/data/portugal_to_korea.json" > "$RESULTS_FOLDER/json-render.bench"
|
||||||
echo "Running packedvector-bench"
|
echo "Running packedvector-bench"
|
||||||
$BENCHMARKS_FOLDER/packedvector-bench > "$RESULTS_FOLDER/packedvector.bench"
|
$BENCHMARKS_FOLDER/packedvector-bench > "$RESULTS_FOLDER/packedvector.bench"
|
||||||
echo "Running rtree-bench"
|
echo "Running rtree-bench"
|
||||||
|
Loading…
Reference in New Issue
Block a user