From b8732147a99352c3505ce054583543cf1b225fa0 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 26 Apr 2022 21:20:44 -0400 Subject: [PATCH] test: lpd by plate count --- tests/sod/lpd/by_plate_count/Makefile | 2 +- tests/sod/lpd/by_plate_count/run.sh | 16 ++++---- tests/sod/lpd/by_plate_count/spec.json | 54 +++++++++++++------------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/sod/lpd/by_plate_count/Makefile b/tests/sod/lpd/by_plate_count/Makefile index 1659147..0225e91 100644 --- a/tests/sod/lpd/by_plate_count/Makefile +++ b/tests/sod/lpd/by_plate_count/Makefile @@ -24,4 +24,4 @@ debug: .PHONY: client client: - curl -H 'Expect:' -H "Content-Type: image/png" --data-binary "@${IMAGE}" "${HOSTNAME}:10000" + curl -H 'Expect:' -H "Content-Type: image/png" --data-binary "@${IMAGE}" "${HOSTNAME}:10000/lpd1" diff --git a/tests/sod/lpd/by_plate_count/run.sh b/tests/sod/lpd/by_plate_count/run.sh index 89f2f08..8659e1a 100755 --- a/tests/sod/lpd/by_plate_count/run.sh +++ b/tests/sod/lpd/by_plate_count/run.sh @@ -69,15 +69,15 @@ run_functional_tests() { # Functional Testing on each image for image in "${lpd1_images[@]}"; do echo "@${image}" >> "${results_directory}/lpd1.txt" - curl --data-binary "@${image}" --output - "${hostname}:10000" >> "${results_directory}/lpd1.txt" + curl --data-binary "@${image}" --output - "${hostname}:10000/lpd1" >> "${results_directory}/lpd1.txt" done for image in "${lpd2_images[@]}"; do echo "@${image}" >> "${results_directory}/lpd2.txt" - curl --data-binary "@${image}" --output - "${hostname}:10001" >> "${results_directory}/lpd2.txt" + curl --data-binary "@${image}" --output - "${hostname}:10000/lpd2" >> "${results_directory}/lpd2.txt" done for image in "${lpd4_images[@]}"; do echo "@${image}" >> "${results_directory}/lpd4.txt" - curl --data-binary "@${image}" --output - "${hostname}:10002" >> "${results_directory}/lpd4.txt" + curl --data-binary "@${image}" --output - "${hostname}:10000/lpd4" >> "${results_directory}/lpd4.txt" done } @@ -103,7 +103,7 @@ run_perf_tests() { ((batch_id++)) get_random_image "$workload" random_image - hey -disable-compression -disable-keepalive -disable-redirects -n $batch_size -c 1 -cpus 1 -t 0 -o csv -m GET -D "${random_image}" "http://${hostname}:${port[$workload]}" > "$results_directory/${workload}_${batch_id}.csv" 2> /dev/null & + hey -disable-compression -disable-keepalive -disable-redirects -n $batch_size -c 1 -cpus 1 -t 0 -o csv -m GET -D "${random_image}" "http://${hostname}:10000${path[$workload]}" > "$results_directory/${workload}_${batch_id}.csv" 2> /dev/null & done pids=$(pgrep hey | tr '\n' ' ') [[ -n $pids ]] && wait -f $pids @@ -129,10 +129,10 @@ validate_dependencies curl declare -a workloads=(lpd1 lpd2 lpd4) -declare -Ar port=( - [lpd1]=10000 - [lpd2]=10001 - [lpd4]=10002 +declare -Ar path=( + [lpd1]=/lpd1 + [lpd2]=/lpd2 + [lpd4]=/lpd4 ) # Sort the images by the number of labeled plates diff --git a/tests/sod/lpd/by_plate_count/spec.json b/tests/sod/lpd/by_plate_count/spec.json index 3f8b6f4..4a568fe 100644 --- a/tests/sod/lpd/by_plate_count/spec.json +++ b/tests/sod/lpd/by_plate_count/spec.json @@ -1,32 +1,32 @@ [ { - "name": "lpd1", - "path": "license_plate_detection.wasm.so", + "name": "gwu", "port": 10000, - "expected-execution-us": 5000, - "relative-deadline-us": 50000, - "http-req-size": 1002400, - "http-resp-size": 1048576, - "http-resp-content-type": "text/plain" - }, - { - "name": "lpd2", - "path": "license_plate_detection.wasm.so", - "port": 10001, - "expected-execution-us": 5000, - "relative-deadline-us": 50000, - "http-req-size": 1002400, - "http-resp-size": 1048576, - "http-resp-content-type": "text/plain" - }, - { - "name": "lpd4", - "path": "license_plate_detection.wasm.so", - "port": 10002, - "expected-execution-us": 5000, - "relative-deadline-us": 50000, - "http-req-size": 1002400, - "http-resp-size": 1048576, - "http-resp-content-type": "text/plain" + "routes": [ + { + "route": "/lpd1", + "path": "license_plate_detection.wasm.so", + "expected-execution-us": 5000, + "relative-deadline-us": 50000, + "http-resp-size": 1048576, + "http-resp-content-type": "text/plain" + }, + { + "route": "/lpd2", + "path": "license_plate_detection.wasm.so", + "expected-execution-us": 5000, + "relative-deadline-us": 50000, + "http-resp-size": 1048576, + "http-resp-content-type": "text/plain" + }, + { + "route": "/lpd4", + "path": "license_plate_detection.wasm.so", + "expected-execution-us": 5000, + "relative-deadline-us": 50000, + "http-resp-size": 1048576, + "http-resp-content-type": "text/plain" + } + ] } ]