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
|
||||
cd ..
|
||||
make -C test/data
|
||||
# - name: Checkout Base Branch
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# ref: ${{ github.event.pull_request.base.ref }}
|
||||
# path: base
|
||||
# - name: Build Base Branch
|
||||
# run: |
|
||||
# mkdir base/build
|
||||
# cd base/build
|
||||
# cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
# make -j$(nproc)
|
||||
# make -j$(nproc) benchmarks
|
||||
# cd ..
|
||||
# make -C test/data
|
||||
- name: Checkout Base Branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
path: base
|
||||
- name: Build Base Branch
|
||||
run: |
|
||||
mkdir base/build
|
||||
cd base/build
|
||||
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) benchmarks
|
||||
cd ..
|
||||
make -C test/data
|
||||
- name: Run Benchmarks
|
||||
run: |
|
||||
./pr/scripts/ci/run_benchmarks.sh base pr
|
||||
|
@ -1,13 +1,13 @@
|
||||
import sys
|
||||
import csv
|
||||
|
||||
def check_csv_is_empty(file_path):
|
||||
def csv_is_empty(file_path):
|
||||
with open(file_path, 'r') as file:
|
||||
lines = file.readlines()
|
||||
return len(lines) <= 1
|
||||
|
||||
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")
|
||||
|
||||
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
|
||||
|
||||
statistics = f'''
|
||||
Request Count: {row['Request Count']}
|
||||
Requests/s: {row['Requests/s']}req/s
|
||||
Failures/s: {row['Failures/s']}fail/s
|
||||
requests: {row['Request Count']}
|
||||
req/s: {row['Requests/s']}req/s
|
||||
fail/s: {row['Failures/s']}fail/s
|
||||
avg: {row['Average Response Time']}ms
|
||||
50%: {row['50%']}
|
||||
75%: {row['75%']}ms
|
@ -34,6 +34,7 @@ function run_benchmarks_for_folder {
|
||||
$BINARIES_FOLDER/osrm-routed --algorithm mld $FOLDER/data.osrm &
|
||||
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"
|
||||
locust -f $FOLDER/scripts/ci/locustfile.py \
|
||||
--headless \
|
||||
@ -45,13 +46,13 @@ function run_benchmarks_for_folder {
|
||||
--csv=locust_results \
|
||||
--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
|
||||
fi
|
||||
}
|
||||
|
||||
# run_benchmarks_for_folder $1 "${1}_results"
|
||||
run_benchmarks_for_folder $1 "${1}_results"
|
||||
run_benchmarks_for_folder $2 "${2}_results"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user