diff --git a/runtime/experiments/applications/licenseplate/.gitignore b/runtime/experiments/applications/licenseplate/by_plate_count/.gitignore similarity index 100% rename from runtime/experiments/applications/licenseplate/.gitignore rename to runtime/experiments/applications/licenseplate/by_plate_count/.gitignore diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars0.csv b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars0.csv new file mode 100644 index 0000000..9355a0b --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars0.csv @@ -0,0 +1 @@ +226,125,193,48 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars0.png b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars0.png new file mode 100644 index 0000000..c16b03b Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars0.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars1.csv b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars1.csv new file mode 100644 index 0000000..45024d2 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars1.csv @@ -0,0 +1 @@ +134,128,128,32 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars1.png b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars1.png new file mode 100644 index 0000000..121a162 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars1.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars2.csv b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars2.csv new file mode 100644 index 0000000..4310537 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars2.csv @@ -0,0 +1 @@ +229,176,41,17 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars2.png b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars2.png new file mode 100644 index 0000000..c64c179 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars2.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars3.csv b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars3.csv new file mode 100644 index 0000000..eab4b44 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars3.csv @@ -0,0 +1 @@ +142,128,119,29 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars3.png b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars3.png new file mode 100644 index 0000000..01d48ca Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars3.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars4.csv b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars4.csv new file mode 100644 index 0000000..a83513f --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars4.csv @@ -0,0 +1 @@ +156,82,347,171 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars4.png b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars4.png new file mode 100644 index 0000000..0ca1fdd Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/1/Cars4.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars143.csv b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars143.csv new file mode 100644 index 0000000..a406621 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars143.csv @@ -0,0 +1,2 @@ +93,196,37,11 +316,195,33,10 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars143.png b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars143.png new file mode 100644 index 0000000..63429ac Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars143.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars295.csv b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars295.csv new file mode 100644 index 0000000..9af9f80 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars295.csv @@ -0,0 +1,2 @@ +52,170,21,12 +237,143,34,19 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars295.png b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars295.png new file mode 100644 index 0000000..9360a62 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars295.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars316.csv b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars316.csv new file mode 100644 index 0000000..1de9852 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars316.csv @@ -0,0 +1,2 @@ +377,405,99,34 +379,192,76,28 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars316.png b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars316.png new file mode 100644 index 0000000..f73b374 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars316.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars71.csv b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars71.csv new file mode 100644 index 0000000..ce031f3 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars71.csv @@ -0,0 +1,2 @@ +254,144,30,8 +86,150,39,11 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars71.png b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars71.png new file mode 100644 index 0000000..a993a12 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars71.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars87.csv b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars87.csv new file mode 100644 index 0000000..27696bc --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars87.csv @@ -0,0 +1,2 @@ +3,205,42,15 +345,168,20,9 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars87.png b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars87.png new file mode 100644 index 0000000..c84cbec Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/2/Cars87.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars106.csv b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars106.csv new file mode 100644 index 0000000..f9095e9 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars106.csv @@ -0,0 +1,4 @@ +138,79,39,13 +245,79,25,15 +169,202,23,29 +225,194,54,23 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars106.png b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars106.png new file mode 100644 index 0000000..c790156 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars106.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars146.csv b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars146.csv new file mode 100644 index 0000000..364b8f4 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars146.csv @@ -0,0 +1,4 @@ +143,263,27,8 +254,238,26,9 +54,189,24,7 +111,194,18,10 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars146.png b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars146.png new file mode 100644 index 0000000..933cc1a Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars146.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars249.csv b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars249.csv new file mode 100644 index 0000000..3bf838b --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars249.csv @@ -0,0 +1,4 @@ +118,91,31,8 +238,60,31,19 +133,195,28,8 +300,208,54,18 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars249.png b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars249.png new file mode 100644 index 0000000..df4351e Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars249.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars277.csv b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars277.csv new file mode 100644 index 0000000..3fe52bc --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars277.csv @@ -0,0 +1,4 @@ +48,218,24,7 +134,217,19,7 +290,220,18,9 +373,212,15,5 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars277.png b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars277.png new file mode 100644 index 0000000..fa0a255 Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars277.png differ diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars330.csv b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars330.csv new file mode 100644 index 0000000..c711399 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars330.csv @@ -0,0 +1,4 @@ +29,192,28,11 +168,202,30,12 +313,180,20,11 +385,172,14,9 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars330.png b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars330.png new file mode 100644 index 0000000..7c3e11a Binary files /dev/null and b/runtime/experiments/applications/licenseplate/by_plate_count/4/Cars330.png differ diff --git a/runtime/experiments/applications/licenseplate/README.md b/runtime/experiments/applications/licenseplate/by_plate_count/README.md similarity index 100% rename from runtime/experiments/applications/licenseplate/README.md rename to runtime/experiments/applications/licenseplate/by_plate_count/README.md diff --git a/runtime/experiments/applications/licenseplate/debug.sh b/runtime/experiments/applications/licenseplate/by_plate_count/debug.sh similarity index 100% rename from runtime/experiments/applications/licenseplate/debug.sh rename to runtime/experiments/applications/licenseplate/by_plate_count/debug.sh diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/log.csv b/runtime/experiments/applications/licenseplate/by_plate_count/log.csv new file mode 100644 index 0000000..47925cd --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/log.csv @@ -0,0 +1,16 @@ +id,function,state,deadline,actual,queued,initializing,runnable,running,blocked,returned +0,lpd1():10000,Complete,50000,1045750,15,0,26,46516,999192,510 +1,lpd1():10000,Complete,50000,1077003,4,0,23,76956,1000018,457 +2,lpd1():10000,Complete,50000,1122135,4,0,27,121007,1001095,1194 +3,lpd1():10000,Complete,50000,1066601,4,0,14,65484,1001097,408 +4,lpd1():10000,Complete,50000,1063433,4,0,25,62343,1001061,525 +5,lpd2():10001,Complete,50000,1073007,4,0,23,71896,1001082,403 +6,lpd2():10001,Complete,50000,1091218,4,0,15,90076,1001122,510 +7,lpd2():10001,Complete,50000,1080843,5,0,23,79721,1001093,493 +8,lpd2():10001,Complete,50000,1084299,4,0,22,83160,1001111,503 +9,lpd2():10001,Complete,50000,1094432,4,0,82,93309,1001036,715 +10,lpd4():10002,Complete,50000,1076785,5,0,26,75576,1001177,434 +11,lpd4():10002,Complete,50000,1098984,4,0,16,98936,1000026,561 +12,lpd4():10002,Complete,50000,1083239,4,0,17,83188,1000029,493 +13,lpd4():10002,Complete,50000,1095906,4,0,26,94940,1000935,564 +14,lpd4():10002,Complete,50000,1087100,7,0,19,86005,1001067,514 diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/run.sh b/runtime/experiments/applications/licenseplate/by_plate_count/run.sh new file mode 100755 index 0000000..a7105d4 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/run.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Executes the runtime in GDB +# Substitutes the absolute path from the container with a path relatively derived from the location of this script +# This allows debugging outside of the Docker container +# Also disables pagination and stopping on SIGUSR1 + +experiment_directory=$(pwd) +project_directory=$(cd ../../../.. && pwd) +binary_directory=$(cd "$project_directory"/bin && pwd) +log="$experiment_directory/log.csv" + +if [ "$1" != "-d" ]; then + SLEDGE_SANDBOX_PERF_LOG=$log PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" & + sleep 1 +else + echo "Running under gdb" +fi + +one_plate=(Cars0 Cars1 Cars2 Cars3 Cars4) +two_plates=(Cars71 Cars87 Cars143 Cars295 Cars316) +four_plates=(Cars106 Cars146 Cars249 Cars277 Cars330) + +for image in ${one_plate[*]}; do + echo "@./1/${image}.png" + curl --data-binary "@./1/${image}.png" --output - localhost:10000 +done +for image in ${two_plates[*]}; do + echo "@./2/${image}.png" + curl --data-binary "@./2/${image}.png" --output - localhost:10001 +done +for image in ${four_plates[*]}; do + echo "@./4/${image}.png" + curl --data-binary "@./4/${image}.png" --output - localhost:10002 +done + +if [ "$1" != "-d" ]; then + sleep 5 + echo -n "Running Cleanup: " + pkill sledgert >/dev/null 2>/dev/null + echo "[DONE]" +fi diff --git a/runtime/experiments/applications/licenseplate/by_plate_count/spec.json b/runtime/experiments/applications/licenseplate/by_plate_count/spec.json new file mode 100644 index 0000000..4e823d4 --- /dev/null +++ b/runtime/experiments/applications/licenseplate/by_plate_count/spec.json @@ -0,0 +1,42 @@ +{ + "active": "yes", + "name": "lpd1", + "path": "lpd_wasm.so", + "port": 10000, + "relative-deadline-us": 50000, + "argsize": 1, + "http-req-headers": [], + "http-req-content-type": "image/jpeg", + "http-req-size": 1002400, + "http-resp-headers": [], + "http-resp-size": 1048576, + "http-resp-content-type": "text/plain" +}, +{ + "active": "yes", + "name": "lpd2", + "path": "lpd_wasm.so", + "port": 10001, + "relative-deadline-us": 50000, + "argsize": 1, + "http-req-headers": [], + "http-req-content-type": "image/jpeg", + "http-req-size": 1002400, + "http-resp-headers": [], + "http-resp-size": 1048576, + "http-resp-content-type": "text/plain" +}, +{ + "active": "yes", + "name": "lpd4", + "path": "lpd_wasm.so", + "port": 10002, + "relative-deadline-us": 50000, + "argsize": 1, + "http-req-headers": [], + "http-req-content-type": "image/jpeg", + "http-req-size": 1002400, + "http-resp-headers": [], + "http-resp-size": 1048576, + "http-resp-content-type": "text/plain" +} diff --git a/runtime/experiments/applications/licenseplate/expected_result.jpg b/runtime/experiments/applications/licenseplate/expected_result.jpg deleted file mode 100644 index bec5209..0000000 Binary files a/runtime/experiments/applications/licenseplate/expected_result.jpg and /dev/null differ diff --git a/runtime/experiments/applications/licenseplate/plate.jpg b/runtime/experiments/applications/licenseplate/plate.jpg deleted file mode 100644 index 5600926..0000000 Binary files a/runtime/experiments/applications/licenseplate/plate.jpg and /dev/null differ diff --git a/runtime/experiments/applications/licenseplate/run.sh b/runtime/experiments/applications/licenseplate/run.sh deleted file mode 100755 index a4185ae..0000000 --- a/runtime/experiments/applications/licenseplate/run.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# Executes the runtime in GDB -# Substitutes the absolute path from the container with a path relatively derived from the location of this script -# This allows debugging outside of the Docker container -# Also disables pagination and stopping on SIGUSR1 - -experiment_directory=$(pwd) -project_directory=$(cd ../../.. && pwd) -binary_directory=$(cd "$project_directory"/bin && pwd) - -# Copy License Plate Image if not here -if [[ ! -f "./plate.jpg" ]]; then - cp ../../../tests/sod/bin/plate.jpg ./plate.jpg -fi - -if [ "$1" != "-d" ]; then - PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" & - sleep 1 -else - echo "Running under gdb" -fi - -expected_size="$(find expected_result.jpg -printf "%s")" -success_count=0 -total_count=50 - -for ((i = 0; i < total_count; i++)); do - echo "$i" - ext="$RANDOM" - curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@plate.jpg" --output "result_$ext.jpg" localhost:10000 2>/dev/null - actual_size="$(find result_"$ext".jpg -printf "%s")" - - # echo "$result" - if [[ "$expected_size" == "$actual_size" ]]; then - echo "SUCCESS $success_count" - else - echo "FAIL" - echo "Expected Size:" - echo "$expected_size" - echo "===============================================" - echo "Actual Size:" - echo "$actual_size" - fi -done - -echo "$success_count / $total_count" - -if [ "$1" != "-d" ]; then - sleep 5 - echo -n "Running Cleanup: " - rm result_*.jpg - pkill sledgert >/dev/null 2>/dev/null - echo "[DONE]" -fi diff --git a/runtime/experiments/applications/licenseplate/spec.json b/runtime/experiments/applications/licenseplate/spec.json deleted file mode 100644 index d24ab1a..0000000 --- a/runtime/experiments/applications/licenseplate/spec.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "active": "yes", - "name": "lpd", - "path": "lpd_wasm.so", - "port": 10000, - "relative-deadline-us": 50000, - "argsize": 1, - "http-req-headers": [], - "http-req-content-type": "image/jpeg", - "http-req-size": 102400, - "http-resp-headers": [], - "http-resp-size": 1048576, - "http-resp-content-type": "image/jpeg" -} diff --git a/runtime/tests/sod b/runtime/tests/sod index 8df9f4d..3060d01 160000 --- a/runtime/tests/sod +++ b/runtime/tests/sod @@ -1 +1 @@ -Subproject commit 8df9f4d8a3fd80f06d38cae50362d507f5878ebf +Subproject commit 3060d0102555aab949308247a78252fa75568e45