@ -15,15 +15,15 @@ for scheduler in ${schedulers[*]}; do
log = log.txt
log = log.txt
mkdir -p " $results_directory "
mkdir -p " $results_directory "
log_environment >> " $results_directory / $log "
log_environment >> " $results_directory / $log "
# Start the runtime
# Start the runtime
if [ " $1 " != "-d" ] ; then
if [ " $1 " != "-d" ] ; then
SLEDGE_NWORKERS = 5 SLEDGE_SCHEDULER = $scheduler PATH = " $binary_directory : $PATH " LD_LIBRARY_PATH = " $binary_directory : $LD_LIBRARY_PATH " sledgert " $experiment_directory /spec.json " >>" $results_directory / $log " 2>>" $results_directory / $log " &
SLEDGE_NWORKERS = 5 SLEDGE_SCHEDULER = $scheduler PATH = " $binary_directory : $PATH " LD_LIBRARY_PATH = " $binary_directory : $LD_LIBRARY_PATH " sledgert " $experiment_directory /spec.json " >> " $results_directory / $log " 2>> " $results_directory / $log " &
sleep 1
sleep 1
else
else
echo "Running under gdb"
echo "Running under gdb"
echo "Running under gdb" >>" $results_directory / $log "
echo "Running under gdb" >> " $results_directory / $log "
fi
fi
inputs = ( 40 10)
inputs = ( 40 10)
@ -40,13 +40,13 @@ for scheduler in ${schedulers[*]}; do
echo "Running Experiments"
echo "Running Experiments"
# Run each separately
# Run each separately
hey -z ${ duration_sec } s -cpus 4 -c 100 -t 0 -o csv -m GET -d "40\n" http://localhost:10040 >" $results_directory /fib40.csv "
hey -z ${ duration_sec } s -cpus 4 -c 100 -t 0 -o csv -m GET -d "40\n" http://localhost:10040 > " $results_directory /fib40.csv "
hey -z ${ duration_sec } s -cpus 4 -c 100 -t 0 -o csv -m GET -d "10\n" http://localhost:10010 >" $results_directory /fib10.csv "
hey -z ${ duration_sec } s -cpus 4 -c 100 -t 0 -o csv -m GET -d "10\n" http://localhost:10010 > " $results_directory /fib10.csv "
# Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
# Run lower priority first, then higher priority. The lower priority has offsets to ensure it runs the entire time the high priority is trying to run
hey -z $(( duration_sec + 2 * offset)) s -cpus 2 -c 100 -t 0 -o csv -m GET -d "40\n" http://localhost:10040 >" $results_directory /fib40-con.csv " &
hey -z $(( duration_sec + 2 * offset)) s -cpus 2 -c 100 -t 0 -o csv -m GET -d "40\n" http://localhost:10040 > " $results_directory /fib40-con.csv " &
sleep $offset
sleep $offset
hey -z ${ duration_sec } s -cpus 2 -c 100 -t 0 -o csv -m GET -d "10\n" http://localhost:10010 >" $results_directory /fib10-con.csv " &
hey -z ${ duration_sec } s -cpus 2 -c 100 -t 0 -o csv -m GET -d "10\n" http://localhost:10010 > " $results_directory /fib10-con.csv " &
sleep $(( duration_sec + offset + 15 ))
sleep $(( duration_sec + offset + 15 ))
# Stop the runtime if not in debug mode
# Stop the runtime if not in debug mode
@ -55,9 +55,9 @@ for scheduler in ${schedulers[*]}; do
# Generate *.csv and *.dat results
# Generate *.csv and *.dat results
echo -n "Parsing Results: "
echo -n "Parsing Results: "
printf "Payload,Success_Rate\n" >>" $results_directory /success.csv "
printf "Payload,Success_Rate\n" >> " $results_directory /success.csv "
printf "Payload,Throughput\n" >>" $results_directory /throughput.csv "
printf "Payload,Throughput\n" >> " $results_directory /throughput.csv "
printf "Payload,p50,p90,p99,p100\n" >>" $results_directory /latency.csv "
printf "Payload,p50,p90,p99,p100\n" >> " $results_directory /latency.csv "
deadlines_ms = ( 2 2 3000 3000)
deadlines_ms = ( 2 2 3000 3000)
payloads = ( fib10 fib10-con fib40 fib40-con)
payloads = ( fib10 fib10-con fib40 fib40-con)
@ -68,27 +68,27 @@ for scheduler in ${schedulers[*]}; do
deadline = ${ deadlines_ms [ $i ] }
deadline = ${ deadlines_ms [ $i ] }
# Get Number of Requests
# Get Number of Requests
requests = $(( $( wc -l <" $results_directory / $payload .csv " ) - 1 ))
requests = $(( $( wc -l < " $results_directory / $payload .csv " ) - 1 ))
( ( requests = = 0) ) && continue
( ( requests = = 0) ) && continue
# Calculate Success Rate for csv
# Calculate Success Rate for csv
awk -F, '
awk -F, '
$7 = = 200 && ( $1 * 1000) <= '"$deadline"' { ok++}
$7 = = 200 && ( $1 * 1000) <= '"$deadline"' { ok++}
END{ printf "'" $payload "',%3.5f%\n" , ( ok / ( NR - 1) * 100) }
END{ printf "'" $payload "',%3.5f%\n" , ( ok / ( NR - 1) * 100) }
' <" $results_directory / $payload .csv " >>" $results_directory /success.csv "
' < " $results_directory / $payload .csv " >> " $results_directory /success.csv "
# Filter on 200s, convery from s to ms, and sort
# Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <" $results_directory / $payload .csv " |
awk -F, '$7 == 200 {print ($1 * 1000)}' < " $results_directory / $payload .csv " \
sort -g > " $results_directory / $payload -response.csv "
| sort -g > " $results_directory / $payload -response.csv "
# Get Number of 200s
# Get Number of 200s
oks = $( wc -l < " $results_directory / $payload -response.csv " )
oks = $( wc -l < " $results_directory / $payload -response.csv " )
( ( oks = = 0) ) && continue # If all errors, skip line
( ( oks = = 0) ) && continue # If all errors, skip line
# Get Latest Timestamp
# Get Latest Timestamp
duration = $( tail -n1 " $results_directory / $payload .csv " | cut -d, -f8)
duration = $( tail -n1 " $results_directory / $payload .csv " | cut -d, -f8)
throughput = $( echo " $oks / $duration " | bc)
throughput = $( echo " $oks / $duration " | bc)
printf "%s,%f\n" " $payload " " $throughput " >>" $results_directory /throughput.csv "
printf "%s,%f\n" " $payload " " $throughput " >> " $results_directory /throughput.csv "
# Generate Latency Data for csv
# Generate Latency Data for csv
awk '
awk '
@ -104,7 +104,7 @@ for scheduler in ${schedulers[*]}; do
NR = = p90 { printf "%1.4f%," , $0 / '"$deadline"' * 100}
NR = = p90 { printf "%1.4f%," , $0 / '"$deadline"' * 100}
NR = = p99 { printf "%1.4f%," , $0 / '"$deadline"' * 100}
NR = = p99 { printf "%1.4f%," , $0 / '"$deadline"' * 100}
NR = = p100 { printf "%1.4f%\n" , $0 / '"$deadline"' * 100}
NR = = p100 { printf "%1.4f%\n" , $0 / '"$deadline"' * 100}
' <" $results_directory / $payload -response.csv " >>" $results_directory /latency.csv "
' < " $results_directory / $payload -response.csv " >> " $results_directory /latency.csv "
# Delete scratch file used for sorting/counting
# Delete scratch file used for sorting/counting
# rm -rf "$results_directory/$payload-response.csv"
# rm -rf "$results_directory/$payload-response.csv"
@ -112,8 +112,8 @@ for scheduler in ${schedulers[*]}; do
# Transform csvs to dat files for gnuplot
# Transform csvs to dat files for gnuplot
for file in success latency throughput; do
for file in success latency throughput; do
echo -n "#" > " $results_directory / $file .dat "
echo -n "#" > " $results_directory / $file .dat "
tr ',' ' ' < " $results_directory / $file .csv " | column -t >>" $results_directory / $file .dat "
tr ',' ' ' < " $results_directory / $file .csv " | column -t >> " $results_directory / $file .dat "
done
done
# Generate gnuplots. Commented out because we don't have *.gnuplots defined
# Generate gnuplots. Commented out because we don't have *.gnuplots defined