From 1b7894b2db898a47dadee754b8a776569375c11f Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 23 Feb 2022 21:13:42 -0500 Subject: [PATCH] chore: test enhancements for benchmarking --- tests/deadline_description/Makefile | 40 ++++++++++++++++++++++++++++ tests/deadline_description/spec.json | 10 +++---- tests/workload_mix_realworld/run.sh | 8 ++---- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/tests/deadline_description/Makefile b/tests/deadline_description/Makefile index b40cea00..ef2ff749 100644 --- a/tests/deadline_description/Makefile +++ b/tests/deadline_description/Makefile @@ -7,7 +7,47 @@ clean: rm -rf res/* run: + SLEDGE_SCHEDULER=FIFO SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 \ LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json debug: LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert --eval-command="run spec.json" + +bench-ekf: + echo 'hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./ekf/initial_state.dat" "http://${HOSTNAME}:10000"' > ekf.txt + hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./ekf/initial_state.dat" "http://${HOSTNAME}:10000" >> ekf.txt 2>&1 + +client-ekf: + cat ./ekf/initial_state.dat | http :10000 + +bench-resize: + echo 'hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./resize/shrinking_man_large.jpg" "http://${HOSTNAME}:10001"' > resize.txt + hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./resize/shrinking_man_large.jpg" "http://${HOSTNAME}:10001" >> resize.txt 2>&1 + +client-resize: + cat ./resize/shrinking_man_large.jpg | http "http://${HOSTNAME}:10001" + +bench-lpd: + echo 'hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./lpd/Cars0.png" "http://${HOSTNAME}:10002"' > lpd.txt + hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./lpd/Cars0.png" "http://${HOSTNAME}:10002" >> lpd.txt 2>&1 + +client-lpd: + cat ./lpd/Cars0.png | http "http://${HOSTNAME}:10002" + +bench-gocr: + echo 'hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./gocr/hyde.pnm" "http://${HOSTNAME}:10003"' > gocr.txt + hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./gocr/hyde.pnm" "http://${HOSTNAME}:10003" >> gocr.txt 2>&1 + +client-gocr: + cat ./gocr/hyde.pnm | http "http://${HOSTNAME}:10003" + +bench-cifar10: + echo 'hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./cifar10/airplane1.bmp" "http://${HOSTNAME}:10004"' > cifar10.txt + hey -disable-compression -disable-keepalive -disable-redirects -z 10m -c 1 -cpus 1 -t 0 -m GET -D "./cifar10/airplane1.bmp" "http://${HOSTNAME}:10004" >> cifar10.txt 2>&1 + +client-cifar10: + cat ./cifar10/airplane1.bmp | http "http://${HOSTNAME}:10004" + + +bench-all: bench-ekf bench-resize bench-lpd bench-gocr bench-cifar10 + diff --git a/tests/deadline_description/spec.json b/tests/deadline_description/spec.json index 50ede9d9..50ebc89f 100644 --- a/tests/deadline_description/spec.json +++ b/tests/deadline_description/spec.json @@ -5,8 +5,8 @@ "port": 10000, "expected-execution-us": 5000, "relative-deadline-us": 50000, - "http-req-size": 1024000, - "http-resp-size": 1024000, + "http-req-size": 10000, + "http-resp-size": 10000, "http-resp-content-type": "application/octet-stream" }, { @@ -16,7 +16,7 @@ "expected-execution-us": 5000, "relative-deadline-us": 50000, "http-req-size": 1024000, - "http-resp-size": 1024000, + "http-resp-size": 512000, "http-resp-content-type": "image/png" }, { @@ -26,7 +26,7 @@ "expected-execution-us": 5000, "relative-deadline-us": 50000, "http-req-size": 1002400, - "http-resp-size": 1048576, + "http-resp-size": 10000, "http-resp-content-type": "text/plain" }, { @@ -36,7 +36,7 @@ "expected-execution-us": 5000, "relative-deadline-us": 360000, "http-req-size": 5335057, - "http-resp-size": 5335057, + "http-resp-size": 10000, "http-resp-content-type": "text/plain" }, { diff --git a/tests/workload_mix_realworld/run.sh b/tests/workload_mix_realworld/run.sh index f06a46a8..46daf5cb 100755 --- a/tests/workload_mix_realworld/run.sh +++ b/tests/workload_mix_realworld/run.sh @@ -52,11 +52,7 @@ initialize_globals() { get_port() { local name="$1" - { - echo "[" - cat ./spec.json - echo "]" - } | jq ".[] | select(.name == \"$name\") | .port" + cat ./spec.json | jq ".[] | select(.name == \"$name\") | .port" } run_experiments() { @@ -122,7 +118,7 @@ run_experiments() { ((batch_id++)) for workload in "${workloads[@]}"; do shortname="${workload%%_+([[:digit:]]).+([[:digit:]])}" - if ((roll >= floor[$workload] && roll < floor[$workload] + length[$workload])); then + if ((roll >= floor[$workload] && roll < (floor[$workload] + length[$workload]))); then # We require word splitting on the value returned by the body associative array #shellcheck disable=SC2086 hey -disable-compression -disable-keepalive -disable-redirects -n $batch_size -c 1 -cpus 1 -t 0 -o csv -m GET ${body[$shortname]} "http://${hostname}:${port[$workload]}" > /dev/null 2> /dev/null &