chore: Validate perf on baremetal server

main
Sean McBride 4 years ago
parent 0b9ca90fd0
commit db0c3504c0

@ -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 # 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 # 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 # Create non-root user and add to sudoers
ARG USERNAME=dev ARG USERNAME=dev
ARG USER_UID=1000 ARG USER_UID=1000

@ -1 +1,3 @@
res res
perf.data
perf.data.old

@ -16,7 +16,7 @@ usage() {
echo " -t,--target=<target url> Execute as client against remote URL" echo " -t,--target=<target url> Execute as client against remote URL"
echo " -s,--serve=<EDF|FIFO> Serve with scheduling policy, but do not run client" echo " -s,--serve=<EDF|FIFO> Serve with scheduling policy, but do not run client"
echo " -d,--debug=<EDF|FIFO> Debug under GDB with scheduling policy, but do not run client" echo " -d,--debug=<EDF|FIFO> Debug under GDB with scheduling policy, but do not run client"
echo " -p,--perf=<EDF|FIFO> Run under perf with scheduling policy, but do not run client" echo " -p,--perf=<EDF|FIFO> Run under perf with scheduling policy. Run on baremetal Linux host!"
} }
# Declares application level global state # Declares application level global state
@ -410,10 +410,12 @@ run_perf() {
return 1 return 1
fi fi
[[ ! -x perf ]] && { if ! command -v perf; then
echo "perf is not present" echo "perf is not present."
exit 1 exit 1
} fi
local -r scheduler="$1"
SLEDGE_SCHEDULER="$scheduler" perf record -g -s sledgert "$experiment_directory/spec.json" SLEDGE_SCHEDULER="$scheduler" perf record -g -s sledgert "$experiment_directory/spec.json"
} }

Loading…
Cancel
Save