From 97c5faf0f208390f3d183e1145a2f20a2e278a2b Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 18 Mar 2021 11:57:42 -0400 Subject: [PATCH] feat: log resolution experiment data --- .../applications/ekf/by_iteration/README.md | 5 +++++ .../experiments/applications/ekf/by_iteration/run.sh | 4 ---- .../applications/imageresize/by_resolution/.gitignore | 1 + .../applications/imageresize/by_resolution/run.sh | 10 +++------- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/runtime/experiments/applications/ekf/by_iteration/README.md b/runtime/experiments/applications/ekf/by_iteration/README.md index 3dd556d..cb9a60b 100644 --- a/runtime/experiments/applications/ekf/by_iteration/README.md +++ b/runtime/experiments/applications/ekf/by_iteration/README.md @@ -9,3 +9,8 @@ The `rust.sh` script stores per-run results to temporary files suffixed with `*. In order to be compatible with the stdin/stdout model of serverless, the input and output files are binary concatenations of various C structs. See `main()` in `runtime/tests/TinyEKF/extras/c/gps_ekf_fn.c` for specifics. + +## Useful parsing of the log + +_What is the average execution time of the first iteration?_ +cat log.csv | grep ekf_first_iter | awk -F , '{ sum+=$5 } END{ print sum/NR }' diff --git a/runtime/experiments/applications/ekf/by_iteration/run.sh b/runtime/experiments/applications/ekf/by_iteration/run.sh index 870dca1..038d012 100755 --- a/runtime/experiments/applications/ekf/by_iteration/run.sh +++ b/runtime/experiments/applications/ekf/by_iteration/run.sh @@ -21,10 +21,6 @@ else echo "Running under gdb" fi -one_iteration_expected_result="$(tr -d '\0' <./one_iteration.dat)" -two_iterations_expected_result="$(tr -d '\0' <./two_iterations.dat)" -three_iterations_expected_result="$(tr -d '\0' <./three_iterations.dat)" - success_count=0 total_count=50 diff --git a/runtime/experiments/applications/imageresize/by_resolution/.gitignore b/runtime/experiments/applications/imageresize/by_resolution/.gitignore index 978a56e..f3c930c 100644 --- a/runtime/experiments/applications/imageresize/by_resolution/.gitignore +++ b/runtime/experiments/applications/imageresize/by_resolution/.gitignore @@ -1 +1,2 @@ result_*.png +log.csv diff --git a/runtime/experiments/applications/imageresize/by_resolution/run.sh b/runtime/experiments/applications/imageresize/by_resolution/run.sh index 1e00455..294fb92 100755 --- a/runtime/experiments/applications/imageresize/by_resolution/run.sh +++ b/runtime/experiments/applications/imageresize/by_resolution/run.sh @@ -7,21 +7,17 @@ experiment_directory=$(pwd) project_directory=$(cd ../../../.. && pwd) binary_directory=$(cd "$project_directory"/bin && pwd) - -# Copy Flower Image if not here -if [[ ! -f "./flower.jpg" ]]; then - cp ../../../../tests/sod/bin/flower.jpg ./flower.jpg -fi +log="$experiment_directory/log.csv" if [ "$1" != "-d" ]; then - PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" & + SLEDGE_SANDBOX_PERF_LOG=$log PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" & sleep 1 else echo "Running under gdb" fi success_count=0 -total_count=10 +total_count=100 for ((i = 0; i < total_count; i++)); do echo "$i"