From e0180e9b521b25d019f5ccf16cdfe33ea777a0b8 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Wed, 5 Jun 2024 15:57:29 +0200 Subject: [PATCH] Accept `.txt.bz2` files --- cache_utils/2T/analyse.sh | 5 ++--- cache_utils/analyse_results.sh | 13 +++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cache_utils/2T/analyse.sh b/cache_utils/2T/analyse.sh index 1f58abc..63eb645 100755 --- a/cache_utils/2T/analyse.sh +++ b/cache_utils/2T/analyse.sh @@ -1,8 +1,7 @@ #!/bin/sh -# NAME=`basename "$1" .txt.bz2` -# echo $NAME -NAME=$1 +NAME="${1%%.*}" +echo $NAME #bzcat $1 | awk '/^Iteration [:digit:]*[.]*/ ' > "${NAME}-iterations.txt" #rm "${NAME}-results.csv.bz2" diff --git a/cache_utils/analyse_results.sh b/cache_utils/analyse_results.sh index cbdb9c8..acd7c92 100755 --- a/cache_utils/analyse_results.sh +++ b/cache_utils/analyse_results.sh @@ -1,18 +1,19 @@ #!/bin/bash -# Assumes the input file has no extension and isn't bzip compressed -# Automatically runs the different analysis scripts +# Automatically run the different analysis scripts exit_echo () { echo $@; exit 1; } +NAME="${1%%.*}" + [[ $1 ]] || exit_echo "Usage: $0 "; -[[ -f $1.slices.csv ]] || exit_echo "$1.slices.csv not found" -[[ -f $1.cores.csv ]] || exit_echo "$1.cores.csv not found" +[[ -f $NAME.slices.csv ]] || exit_echo "$NAME.slices.csv not found" +[[ -f $NAME.cores.csv ]] || exit_echo "$NAME.cores.csv not found" bash 2T/analyse.sh $1 . venv/bin/activate -python analyse_csv.py $1 -python analyse_medians.py $1 +python analyse_csv.py $NAME +python analyse_medians.py $NAME