From db0c3504c0c28fb2c208aff6d0110fb59cf813ef Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 14 Apr 2021 13:01:41 -0400 Subject: [PATCH] chore: Validate perf on baremetal server --- Dockerfile.x86_64 | 4 ---- runtime/experiments/deadline/.gitignore | 2 ++ runtime/experiments/deadline/run.sh | 10 ++++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile.x86_64 b/Dockerfile.x86_64 index 0022ae1..7d47065 100644 --- a/Dockerfile.x86_64 +++ b/Dockerfile.x86_64 @@ -85,10 +85,6 @@ RUN tar xvfz wasmception.tar.gz -C /sledge/awsm/wasmception # RUN curl -sS -L -O $WASI_SDK_URL && dpkg -i wasi-sdk_8.0_amd64.deb && rm -f wasi-sdk_8.0_amd64.deb # ENV WASI_SDK=/opt/wasi-sdk -# PERF -ADD install_perf.sh /sledge/install_perf.sh -RUN ./sledge/install_perf.sh - # Create non-root user and add to sudoers ARG USERNAME=dev ARG USER_UID=1000 diff --git a/runtime/experiments/deadline/.gitignore b/runtime/experiments/deadline/.gitignore index 64f722e..26cdcd9 100644 --- a/runtime/experiments/deadline/.gitignore +++ b/runtime/experiments/deadline/.gitignore @@ -1 +1,3 @@ res +perf.data +perf.data.old diff --git a/runtime/experiments/deadline/run.sh b/runtime/experiments/deadline/run.sh index 1112522..1be697c 100755 --- a/runtime/experiments/deadline/run.sh +++ b/runtime/experiments/deadline/run.sh @@ -16,7 +16,7 @@ usage() { echo " -t,--target= Execute as client against remote URL" echo " -s,--serve= Serve with scheduling policy, but do not run client" echo " -d,--debug= Debug under GDB with scheduling policy, but do not run client" - echo " -p,--perf= Run under perf with scheduling policy, but do not run client" + echo " -p,--perf= Run under perf with scheduling policy. Run on baremetal Linux host!" } # Declares application level global state @@ -410,10 +410,12 @@ run_perf() { return 1 fi - [[ ! -x perf ]] && { - echo "perf is not present" + if ! command -v perf; then + echo "perf is not present." exit 1 - } + fi + + local -r scheduler="$1" SLEDGE_SCHEDULER="$scheduler" perf record -g -s sledgert "$experiment_directory/spec.json" }