test: imageclassification tenant

master
Sean McBride 3 years ago
parent 69a6cbaa46
commit 42b42e0f1c

@ -14,13 +14,13 @@ debug:
.PHONY: client .PHONY: client
client: client:
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/airplane1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/airplane1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/automobile1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/automobile1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/bird1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/bird1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/cat1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/cat1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/deer1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/deer1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/dog1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/dog1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/frog1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/frog1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/horse1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/horse1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/ship1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/ship1.bmp" "localhost:10000/random"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/truck1.bmp" "localhost:10000" @curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/truck1.bmp" "localhost:10000/random"

@ -28,11 +28,11 @@ run_functional_tests() {
# Functional Testing on each image # Functional Testing on each image
for image in "${cifar10_images[@]}"; do for image in "${cifar10_images[@]}"; do
echo "${image}" >> "${results_directory}/cifar10_rand.txt" echo "${image}" >> "${results_directory}/cifar10_rand.txt"
curl --data-binary "@${image}" -s "${hostname}:10000" >> "${results_directory}/cifar10_rand.txt" curl --data-binary "@${image}" -s "${hostname}:10000/rand" >> "${results_directory}/cifar10_rand.txt"
done done
echo "$same_image" >> "${results_directory}/cifar10_same.txt" echo "$same_image" >> "${results_directory}/cifar10_same.txt"
curl --data-binary "@$same_image" -s "${hostname}:10001" >> "${results_directory}/cifar10_same.txt" curl --data-binary "@$same_image" -s "${hostname}:10000/same" >> "${results_directory}/cifar10_same.txt"
printf "[OK]\n" printf "[OK]\n"
} }
@ -63,7 +63,7 @@ run_perf_tests() {
else else
image=$same_image image=$same_image
fi fi
hey -disable-compression -disable-keepalive -disable-redirects -n $batch_size -c 1 -cpus 1 -t 0 -o csv -m GET -D "${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 "${image}" "http://${hostname}:10000${route[$workload]}" > "$results_directory/${workload}_${batch_id}.csv" 2> /dev/null &
done done
pids=$(pgrep hey | tr '\n' ' ') pids=$(pgrep hey | tr '\n' ' ')
[[ -n $pids ]] && wait -f $pids [[ -n $pids ]] && wait -f $pids
@ -127,9 +127,9 @@ experiment_client() {
validate_dependencies curl validate_dependencies curl
declare -ar workloads=(cifar10_rand cifar10_same) declare -ar workloads=(cifar10_rand cifar10_same)
declare -Ar port=( declare -Ar route=(
[cifar10_rand]=10000 [cifar10_rand]=/rand
[cifar10_same]=10001 [cifar10_same]=/same
) )
# Sort the images by the number of labeled plates # Sort the images by the number of labeled plates

@ -1,22 +1,26 @@
[ [
{ {
"name": "cifar10_rand", "name": "gwu",
"path": "cifar10.wasm.so",
"port": 10000, "port": 10000,
"expected-execution-us": 5000, "routes": [
"relative-deadline-us": 50000, {
"http-req-size": 4096, "route": "/rand",
"http-resp-size": 128, "path": "cifar10.wasm.so",
"http-resp-content-type": "text/plain" "expected-execution-us": 5000,
}, "relative-deadline-us": 50000,
{ "http-req-size": 4096,
"name": "cifar10_same", "http-resp-size": 128,
"path": "cifar10.wasm.so", "http-resp-content-type": "text/plain"
"port": 10001, },
"expected-execution-us": 5000, {
"relative-deadline-us": 50000, "route": "/same",
"http-req-size": 4096, "path": "cifar10.wasm.so",
"http-resp-size": 128, "expected-execution-us": 5000,
"http-resp-content-type": "text/plain" "relative-deadline-us": 50000,
"http-req-size": 4096,
"http-resp-size": 128,
"http-resp-content-type": "text/plain"
}
]
} }
] ]
Loading…
Cancel
Save