From 701434a657303609acd3e6a369943cee98fe47a6 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 1 Jun 2021 10:25:53 -0400 Subject: [PATCH] chore: deadline description error handling --- runtime/experiments/deadline_description/run.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/experiments/deadline_description/run.sh b/runtime/experiments/deadline_description/run.sh index 06ffde1..bfeeff2 100755 --- a/runtime/experiments/deadline_description/run.sh +++ b/runtime/experiments/deadline_description/run.sh @@ -89,6 +89,14 @@ generate_spec() { for workload in "${workloads[@]}"; do multiplier["$workload"]="$(get_random_from_interval $multiplier_interval_lower_bound $multiplier_interval_upper_bound)" baseline_execution["$workload"]="$(get_baseline_execution "$results_directory" "$workload" $percentile)" + [[ -z "${baseline_execution[$workload]}" ]] && { + panic "Failed to get baseline execution for $workload" + exit 1 + } + [[ -z "${multiplier[$workload]}" ]] && { + panic "Failed to generate multiplier for $workload" + exit 1 + } relative_deadline["$workload"]="$(calculate_relative_deadline "${baseline_execution[$workload]}" "${multiplier[$workload]}")" { echo "$workload" @@ -132,7 +140,7 @@ process_results() { local results_directory="$1" for workload in "${workloads[@]}"; do - # Filter on 200s, subtract DNS time, convert from s to ns, and sort + # Filter on 200s, subtract DNS time, convert from s to us, and sort awk -F, '$7 == 200 {print (($1 - $2) * 1000000)}' < "$results_directory/$workload/benchmark.csv" \ | sort -g > "$results_directory/$workload/response_times_sorted.csv" done