Perftest: Changed scripts for new directory structure

This commit is contained in:
rand00 2023-01-10 16:49:44 +01:00
parent bdb01be93b
commit ee2d467678
2 changed files with 11 additions and 9 deletions

View file

@ -3,6 +3,8 @@
set -e set -e
#set -x #set -x
CONF_DIR=$(dirname "${0}")
prog_NAME=$(basename "${0}") prog_NAME=$(basename "${0}")
warn() warn()
@ -107,9 +109,8 @@ APP_ID="$(sqlite3 "$DB" "PRAGMA application_id;")"
[ -z "$APP_ID" ] && die "Couldn't read application-id from '$DB'" [ -z "$APP_ID" ] && die "Couldn't read application-id from '$DB'"
[ "$APP_ID" -ne 1234839235 ] && die "The application-id should be = 1234839235. It is '$APP_ID'" [ "$APP_ID" -ne 1234839235 ] && die "The application-id should be = 1234839235. It is '$APP_ID'"
PERFJOB_DIR="$DATA_DIR/_performance/$JOB" PERFJOB_DIR="$DATA_DIR/_perftest/$JOB"
PERFSCRIPT_DIR="$PERFJOB_DIR" PERFSCRIPT_DIR="$CONF_DIR/perftest/$JOB"
#< goto think if this dir makes the most sense
PERFDATA_DIR="$PERFJOB_DIR/$BIN_SHA256" PERFDATA_DIR="$PERFJOB_DIR/$BIN_SHA256"
if [ -d "$PERFDATA_DIR" ]; then if [ -d "$PERFDATA_DIR" ]; then
@ -126,7 +127,7 @@ SERVER_DIR="undefined"
case "${JOB},${BIN_EXT}" in case "${JOB},${BIN_EXT}" in
unipi,hvt) unipi,hvt)
"$PERFSCRIPT_DIR"/run-test-on-vm.sh "$PERFSCRIPT_DIR" "$PERFDATA_DIR" "$BIN" "$SERVER" "$SERVER_DIR" "$PERFSCRIPT_DIR"/run-test-remotely.sh "$PERFSCRIPT_DIR"/remote "$PERFDATA_DIR" "$BIN" "$SERVER" "$SERVER_DIR"
"$PERFSCRIPT_DIR"/plot.sh "$PERFJOB_DIR" "$CACHE_DIR" "$DB" "$JOB" "$UUID" "$PERFSCRIPT_DIR"/plot.sh "$PERFJOB_DIR" "$CACHE_DIR" "$DB" "$JOB" "$UUID"
;; ;;
*) *)

View file

@ -35,13 +35,11 @@ SERVER_W_DIR="$SERVER:$SERVER_DIR"
SSH="ssh $SERVER" SSH="ssh $SERVER"
scp "$BIN" "$SERVER_W_DIR" scp "$BIN" "$SERVER_W_DIR"
scp "$PERFSCRIPT_DIR"/init.sh "$SERVER_W_DIR" scp -r "$PERFSCRIPT_DIR"/* "$SERVER_W_DIR"
scp "$PERFSCRIPT_DIR"/run-unikernel.sh "$SERVER_W_DIR"
scp "$PERFSCRIPT_DIR"/run-test.sh "$SERVER_W_DIR"
scp "$PERFSCRIPT_DIR"/cleanup.sh "$SERVER_W_DIR"
info initializing context for unikernel info initializing context for unikernel
"$SSH" "$PERFSCRIPT_DIR"/init.sh "$SSH" "$PERFSCRIPT_DIR"/init.sh &
INIT_PID=$!
info running unikernel in background info running unikernel in background
"$SSH" "$PERFSCRIPT_DIR"/run-unikernel.sh & "$SSH" "$PERFSCRIPT_DIR"/run-unikernel.sh &
@ -56,6 +54,9 @@ info running test
info killing unikernel info killing unikernel
kill "$UNIKERNEL_PID" kill "$UNIKERNEL_PID"
info killing init-daemon
kill "$INIT_PID"
info copying results to "$PERFDATA_DIR" info copying results to "$PERFDATA_DIR"
scp "${SERVER_W_DIR}/results/*" "$PERFDATA_DIR" scp "${SERVER_W_DIR}/results/*" "$PERFDATA_DIR"