From 8efe2af17713d02ec9f3a35027853b596e749dff Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 22 Apr 2021 20:05:23 +0000 Subject: [PATCH] chore: Install hey if needed --- runtime/experiments/bimodal/install.sh | 6 ++++++ runtime/experiments/bimodal/run.sh | 5 +++++ runtime/experiments/concurrency/install.sh | 6 ++++++ runtime/experiments/concurrency/run.sh | 5 +++++ runtime/experiments/payload/install.sh | 6 ++++++ runtime/experiments/payload/run.sh | 5 +++++ test.sh | 3 +++ 7 files changed, 36 insertions(+) create mode 100755 runtime/experiments/bimodal/install.sh create mode 100755 runtime/experiments/concurrency/install.sh create mode 100755 runtime/experiments/payload/install.sh diff --git a/runtime/experiments/bimodal/install.sh b/runtime/experiments/bimodal/install.sh new file mode 100755 index 0000000..8688ad7 --- /dev/null +++ b/runtime/experiments/bimodal/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if ! command -v hey; then + HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64 + wget $HEY_URL -O hey && chmod +x hey && mv hey /usr/bin/hey +fi diff --git a/runtime/experiments/bimodal/run.sh b/runtime/experiments/bimodal/run.sh index 2b1400b..73f77db 100755 --- a/runtime/experiments/bimodal/run.sh +++ b/runtime/experiments/bimodal/run.sh @@ -19,6 +19,11 @@ source get_result_count.sh || exit 1 source panic.sh || exit 1 source path_join.sh || exit 1 +if ! command -v hey; then + echo "hey is not present." + exit 1 +fi + # Sends requests until the per-module perf window buffers are full # This ensures that Sledge has accurate estimates of execution time run_samples() { diff --git a/runtime/experiments/concurrency/install.sh b/runtime/experiments/concurrency/install.sh new file mode 100755 index 0000000..8688ad7 --- /dev/null +++ b/runtime/experiments/concurrency/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if ! command -v hey; then + HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64 + wget $HEY_URL -O hey && chmod +x hey && mv hey /usr/bin/hey +fi diff --git a/runtime/experiments/concurrency/run.sh b/runtime/experiments/concurrency/run.sh index 0f69cd4..1f6b4ae 100755 --- a/runtime/experiments/concurrency/run.sh +++ b/runtime/experiments/concurrency/run.sh @@ -15,6 +15,11 @@ source get_result_count.sh || exit 1 source panic.sh || exit 1 source path_join.sh || exit 1 +if ! command -v hey; then + echo "hey is not present." + exit 1 +fi + declare -gi iterations=10000 declare -ga concurrency=(1 20 40 60 80 100) diff --git a/runtime/experiments/payload/install.sh b/runtime/experiments/payload/install.sh new file mode 100755 index 0000000..8688ad7 --- /dev/null +++ b/runtime/experiments/payload/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if ! command -v hey; then + HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64 + wget $HEY_URL -O hey && chmod +x hey && mv hey /usr/bin/hey +fi diff --git a/runtime/experiments/payload/run.sh b/runtime/experiments/payload/run.sh index 6d758c7..a389976 100755 --- a/runtime/experiments/payload/run.sh +++ b/runtime/experiments/payload/run.sh @@ -16,6 +16,11 @@ source "framework.sh" || exit 1 source "get_result_count.sh" || exit 1 source "generate_gnuplots.sh" || exit 1 +if ! command -v hey; then + echo "hey is not present." + exit 1 +fi + # Experiment Globals and Setups declare -ar payloads=(1024 10240 102400 1048576) diff --git a/test.sh b/test.sh index c4d5f7e..acb0ba6 100755 --- a/test.sh +++ b/test.sh @@ -166,6 +166,7 @@ bimodal() { make rttests -C "$base_dir/runtime/tests" || exit 1 fi pushd "$base_dir/runtime/experiments/bimodal/" || exit 1 + ./install.sh || exit 1 ./run.sh || failed_tests+=("bimodal") popd || exit 1 return 0 @@ -177,6 +178,7 @@ concurrency() { make rttests -C "$base_dir/runtime/tests" || exit 1 fi pushd "$base_dir/runtime/experiments/concurrency/" || exit 1 + ./install.sh || exit 1 ./run.sh || failed_tests+=("concurrency") popd || exit 1 return 0 @@ -192,6 +194,7 @@ payload() { fi # TODO: Make Dependency "work1k_wasm.so" "work10k_wasm.so" "work100k_wasm.so" "work1m_wasm.so" pushd "$base_dir/runtime/experiments/payload/" || exit 1 + ./install.sh || exit 1 ./run.sh || failed_tests+=("payload") popd || exit 1 return 0