소스 검색

Allow the user to specify a log suffix in the repro script

Ian Goldberg 1 년 전
부모
커밋
de195ba5e8
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      repro

+ 8 - 2
repro

@@ -48,7 +48,7 @@ fi
 run() {
     now=`date`
     echo "$now: Running $1 $2 $3 $4 $5 ..."
-    logfile="${1}_${3}_${4}_${5}.out"
+    logfile="${1}_${3}_${4}_${5}.out${LOGSUFFIX}"
     ./set-networking $3 $4
     echo "Network setup: $3 $4" >> $logfile
     ./run-experiment $1 $2 $5 >> $logfile
@@ -66,7 +66,7 @@ parse() {
 if [ "$whichexps" == "test" ]; then
     echo "Running test experiment..."
     run read 16 1us 100gbit 2
-    parse read_1us_100gbit_2.out
+    parse read_1us_100gbit_2.out${LOGSUFFIX}
     exit
 fi
 
@@ -137,6 +137,10 @@ fi
 now=`date`
 echo "$now: Experiments complete"
 
+# If you specified a custom log suffix, you're going to be parsing the
+# outputs differently.
+if [ "$LOGSUFFIX" == "" ]; then
+
 parse *.out > floram.dat
 
 echo
@@ -166,3 +170,5 @@ egrep 'Floram read .* 1us 100gbit .* s$' floram.dat | sort -k3 -n
 echo
 echo "# Figure 9(c)"
 egrep 'Floram read .* 1us 100gbit .* KiB$' floram.dat | sort -k3 -n
+
+fi