wip
This commit is contained in:
parent
5ee5b89854
commit
8aebc1336b
28
.github/workflows/osrm-backend.yml
vendored
28
.github/workflows/osrm-backend.yml
vendored
@ -660,20 +660,20 @@ jobs:
|
|||||||
make -j$(nproc) benchmarks
|
make -j$(nproc) benchmarks
|
||||||
cd ..
|
cd ..
|
||||||
make -C test/data
|
make -C test/data
|
||||||
# - name: Checkout Base Branch
|
- name: Checkout Base Branch
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# with:
|
with:
|
||||||
# ref: ${{ github.event.pull_request.base.ref }}
|
ref: ${{ github.event.pull_request.base.ref }}
|
||||||
# path: base
|
path: base
|
||||||
# - name: Build Base Branch
|
- name: Build Base Branch
|
||||||
# run: |
|
run: |
|
||||||
# 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 ..
|
||||||
# make -j$(nproc)
|
make -j$(nproc)
|
||||||
# make -j$(nproc) benchmarks
|
make -j$(nproc) benchmarks
|
||||||
# cd ..
|
cd ..
|
||||||
# make -C test/data
|
make -C test/data
|
||||||
- name: Run Benchmarks
|
- name: Run Benchmarks
|
||||||
run: |
|
run: |
|
||||||
./pr/scripts/ci/run_benchmarks.sh base pr
|
./pr/scripts/ci/run_benchmarks.sh base pr
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import sys
|
import sys
|
||||||
import csv
|
import csv
|
||||||
|
|
||||||
def check_csv_is_empty(file_path):
|
def csv_is_empty(file_path):
|
||||||
with open(file_path, 'r') as file:
|
with open(file_path, 'r') as file:
|
||||||
lines = file.readlines()
|
lines = file.readlines()
|
||||||
return len(lines) <= 1
|
return len(lines) <= 1
|
||||||
|
|
||||||
def main(locust_csv_base_name, prefix, output_folder):
|
def main(locust_csv_base_name, prefix, output_folder):
|
||||||
if not check_csv_is_empty(f"{locust_csv_base_name}_exceptions.csv") or not check_csv_is_empty(f"{locust_csv_base_name}_failures"):
|
if not csv_is_empty(f"{locust_csv_base_name}_exceptions.csv") or not csv_is_empty(f"{locust_csv_base_name}_failures.csv"):
|
||||||
raise Exception("There are exceptions or failures in the locust benchmark")
|
raise Exception("There are exceptions or failures in the locust benchmark")
|
||||||
|
|
||||||
with open(f"{locust_csv_base_name}_stats.csv", 'r') as file:
|
with open(f"{locust_csv_base_name}_stats.csv", 'r') as file:
|
||||||
@ -17,9 +17,9 @@ def main(locust_csv_base_name, prefix, output_folder):
|
|||||||
if name == 'Aggregated': continue
|
if name == 'Aggregated': continue
|
||||||
|
|
||||||
statistics = f'''
|
statistics = f'''
|
||||||
Request Count: {row['Request Count']}
|
requests: {row['Request Count']}
|
||||||
Requests/s: {row['Requests/s']}req/s
|
req/s: {row['Requests/s']}req/s
|
||||||
Failures/s: {row['Failures/s']}fail/s
|
fail/s: {row['Failures/s']}fail/s
|
||||||
avg: {row['Average Response Time']}ms
|
avg: {row['Average Response Time']}ms
|
||||||
50%: {row['50%']}
|
50%: {row['50%']}
|
||||||
75%: {row['75%']}ms
|
75%: {row['75%']}ms
|
@ -34,6 +34,7 @@ function run_benchmarks_for_folder {
|
|||||||
$BINARIES_FOLDER/osrm-routed --algorithm mld $FOLDER/data.osrm &
|
$BINARIES_FOLDER/osrm-routed --algorithm mld $FOLDER/data.osrm &
|
||||||
OSRM_ROUTED_PID=$!
|
OSRM_ROUTED_PID=$!
|
||||||
|
|
||||||
|
# wait for osrm-routed to start
|
||||||
curl --retry-delay 3 --retry 10 --retry-all-errors "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
|
curl --retry-delay 3 --retry 10 --retry-all-errors "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
|
||||||
locust -f $FOLDER/scripts/ci/locustfile.py \
|
locust -f $FOLDER/scripts/ci/locustfile.py \
|
||||||
--headless \
|
--headless \
|
||||||
@ -45,13 +46,13 @@ function run_benchmarks_for_folder {
|
|||||||
--csv=locust_results \
|
--csv=locust_results \
|
||||||
--loglevel ERROR
|
--loglevel ERROR
|
||||||
|
|
||||||
python3 $FOLDER/scripts/ci/process_locust_results.py locust_results mld $RESULTS_FOLDER
|
python3 $FOLDER/scripts/ci/process_locust_benchmark_results.py locust_results mld $RESULTS_FOLDER
|
||||||
|
|
||||||
|
|
||||||
kill -0 $OSRM_ROUTED_PID
|
kill -0 $OSRM_ROUTED_PID
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# run_benchmarks_for_folder $1 "${1}_results"
|
run_benchmarks_for_folder $1 "${1}_results"
|
||||||
run_benchmarks_for_folder $2 "${2}_results"
|
run_benchmarks_for_folder $2 "${2}_results"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user