Skip to content
Snippets Groups Projects
Commit d316f6eb authored by Peter Cai's avatar Peter Cai
Browse files

Add support for running auxilliary experiments for error bars and avg

parent 8014ddbd
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ run_mutilate() { ...@@ -51,7 +51,7 @@ run_mutilate() {
fi fi
echo "Running mutilate with $CONNS connections per agent (core) and QPS = $QPS" echo "Running mutilate with $CONNS connections per agent (core) and QPS = $QPS"
perf_stat_start "$1" perf_stat_start "$1"
sudo -u $SSH_USER $MUTILATE --noload -c$CONNS $MUTCLIENTS -t30 -u 0 -q $QPS | tee $DATA_OUT/$1.txt sudo -u $SSH_USER $MUTILATE --noload -c$CONNS $MUTCLIENTS -t30 -u 0 -q $QPS | tee $DATA_OUT/$1$EXP_AUX_SUFFIX.txt
perf_stat_stop perf_stat_stop
NO_RUNS=$((NO_RUNS + 1)) NO_RUNS=$((NO_RUNS + 1))
} }
......
perf_stat_start() { perf_stat_start() {
$PERF stat -C 0-$((THREADS - 1)) -e LLC-load-misses:u,LLC-load-misses:k,mem_load_uops_retired.llc_miss,mem_uops_retired.all_loads,cycles,cycles:u,cycles:k,instructions,instructions:u,instructions:k,stalled-cycles-frontend,stalled-cycles-backend -o "$DATA_OUT/stat_$1.txt" & $PERF stat -C 0-$((THREADS - 1)) -e LLC-load-misses:u,LLC-load-misses:k,mem_load_uops_retired.llc_miss,mem_uops_retired.all_loads,cycles,cycles:u,cycles:k,instructions,instructions:u,instructions:k,stalled-cycles-frontend,stalled-cycles-backend -o "$DATA_OUT/stat_$1$EXP_AUX_SUFFIX.txt" &
PERF_STAT_PID=$! PERF_STAT_PID=$!
} }
......
...@@ -46,6 +46,15 @@ while [[ $# -gt 0 ]]; do ...@@ -46,6 +46,15 @@ while [[ $# -gt 0 ]]; do
USERSTACK=true USERSTACK=true
shift shift
;; ;;
-f|--force)
FORCE_REMOVE=true
shift
;;
--aux)
EXP_AUX_SUFFIX="_aux$2"
shift
shift
;;
*) *)
echo "Unknown option $1" echo "Unknown option $1"
exit 1 exit 1
...@@ -122,8 +131,16 @@ fi ...@@ -122,8 +131,16 @@ fi
DATA_OUT="$EXP_ROOT/data/$EXPERIMENT_NAME" DATA_OUT="$EXP_ROOT/data/$EXPERIMENT_NAME"
rm -rf "$DATA_OUT" if [ -d "$DATA_OUT" ] && [ -z "$EXP_AUX_SUFFIX" ]; then
mkdir -p "$DATA_OUT" if [ "$FORCE_REMOVE" == "true" ]; then
rm -rf "$DATA_OUT"
else
echo "Experiment directory $DATA_OUT already exists. Remove it manually or use --force. To run auxillary experiments for multiple sets of data, use --aux <num>"
exit 1
fi
else
mkdir -p "$DATA_OUT"
fi
run_exp run_exp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment