packaging/perftest/unipi/plot.sh: Prefixing build UUID to each row in DAT file

This commit is contained in:
rand00 2022-12-20 21:18:56 +01:00
parent dd6f054a88
commit 34aa7a767a

View file

@ -35,19 +35,22 @@ while read UUID; do
BIN_SHA256=$(get_bin_hash "$UUID") BIN_SHA256=$(get_bin_hash "$UUID")
CSV="${PERFJOB_DIR}/${BIN_SHA256}/siege.csv" CSV="${PERFJOB_DIR}/${BIN_SHA256}/siege.csv"
#goto prefix uuid title
if [ $N = 1 ]; then if [ $N = 1 ]; then
echo \# $(cat "$CSV" | head -n1 | cut -d, -f"$COLS" \ echo -n "# Build UUID - "
echo $(cat "$CSV" | head -n1 | cut -d, -f"$COLS" \
| sed 's/,//g' \ | sed 's/,//g' \
| sed 's/ \+//' \ | sed 's/ \+//' \
| sed 's/\( \+\)/ -\1/g' \ | sed 's/\( \+\)/ -\1/g' \
) > "$DAT" ) > "$DAT"
fi fi
#goto prefix uuid data #goto validate csv file, and on invalid: append error-data instead
echo -n "$UUID " >> "$DAT"
cat "$CSV" | tail +2 | cut -d, -f"$COLS" \ cat "$CSV" | tail +2 | cut -d, -f"$COLS" \
| sed 's/,//g' \ | sed 's/,//g' \
| sed 's/ \+//' >> "$DAT" | sed 's/ \+//' >> "$DAT"
N=$(($N + 1)) N=$(($N + 1))
done < <(get_jobs_build-uuids) done < <(get_jobs_build-uuids)