Perftest: Fixed plot script semantics + made perftest.sh work with args given from builder-web ++
This commit is contained in:
parent
932d10cbaf
commit
20bc1785d0
2 changed files with 36 additions and 12 deletions
|
@ -88,9 +88,10 @@ done
|
||||||
[ -z "${CACHE_DIR}" ] && die "The --cache-dir option must be specified"
|
[ -z "${CACHE_DIR}" ] && die "The --cache-dir option must be specified"
|
||||||
[ -z "${DATA_DIR}" ] && die "The --data-dir option must be specified"
|
[ -z "${DATA_DIR}" ] && die "The --data-dir option must be specified"
|
||||||
|
|
||||||
BIN_REL="$1"
|
BIN="$1"
|
||||||
[ -z "${BIN_REL}" ] && \
|
[ -z "${BIN}" ] && \
|
||||||
die "The main binarys localpath must be given as the first positional argument"
|
die "The main binarys localpath must be given as the first positional argument"
|
||||||
|
BIN_EXT=$(echo "$BIN" | sed 's/.*\.\(.*\)/\1/')
|
||||||
|
|
||||||
# >>> CONFIGURE PER SYSTEM
|
# >>> CONFIGURE PER SYSTEM
|
||||||
SERVER="starand"
|
SERVER="starand"
|
||||||
|
@ -99,9 +100,6 @@ SERVER_DIR="0tmp/robur_perftest"
|
||||||
|
|
||||||
info "processing UUID '$UUID'"
|
info "processing UUID '$UUID'"
|
||||||
|
|
||||||
BIN="${DATA_DIR}/$BIN_REL"
|
|
||||||
BIN_EXT=$(echo "$BIN_REL" | sed 's/.*\.\(.*\)/\1/')
|
|
||||||
|
|
||||||
DB="${DATA_DIR}/builder.sqlite3"
|
DB="${DATA_DIR}/builder.sqlite3"
|
||||||
|
|
||||||
DB="${DATA_DIR}/builder.sqlite3"
|
DB="${DATA_DIR}/builder.sqlite3"
|
||||||
|
|
|
@ -2,6 +2,29 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
prog_NAME=$(basename "${0}")
|
||||||
|
|
||||||
|
warn()
|
||||||
|
{
|
||||||
|
echo "${prog_NAME}: WARN: $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
info()
|
||||||
|
{
|
||||||
|
echo "${prog_NAME}: INFO: $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
err()
|
||||||
|
{
|
||||||
|
echo "${prog_NAME}: ERROR: $*" 1>&2
|
||||||
|
}
|
||||||
|
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
echo "${prog_NAME}: ERROR: $*" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
PERFJOB_DIR="$1"
|
PERFJOB_DIR="$1"
|
||||||
CACHE_DIR="$2"
|
CACHE_DIR="$2"
|
||||||
DB="$3"
|
DB="$3"
|
||||||
|
@ -14,11 +37,12 @@ COLS=5,7,8 #resp-time, throughput, concurrent
|
||||||
|
|
||||||
DAT="${PERFJOB_DIR}/tmp.dat"
|
DAT="${PERFJOB_DIR}/tmp.dat"
|
||||||
|
|
||||||
|
#> Note: ordering desc for plot ordering left->right
|
||||||
get_jobs_build-uuids () {
|
get_jobs_build-uuids () {
|
||||||
sqlite3 "$DB" "select b.uuid from build as b \
|
sqlite3 "$DB" "select b.uuid from build as b \
|
||||||
join job as j on j.id = b.job\
|
join job as j on j.id = b.job\
|
||||||
where j.name = '$JOB' \
|
where j.name = '$JOB' \
|
||||||
order by b.id asc"
|
order by b.id desc"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_bin_hash () {
|
get_bin_hash () {
|
||||||
|
@ -36,21 +60,23 @@ while read -r UUID; do
|
||||||
CSV="${PERFJOB_DIR}/${BIN_SHA256}/siege_test01.csv"
|
CSV="${PERFJOB_DIR}/${BIN_SHA256}/siege_test01.csv"
|
||||||
|
|
||||||
if [ ! -f "$CSV" ]; then
|
if [ ! -f "$CSV" ]; then
|
||||||
echo "Skipping build with uuid '$UUID'. Test-data doesn't exist: '$CSV'"
|
info "Skipping build with uuid '$UUID'. Test-data doesn't exist: '$CSV'"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $N = 1 ]; then
|
if [ $N = 0 ]; then
|
||||||
echo -n "# Build UUID - "
|
echo -n "# Build UUID - " > "$DAT"
|
||||||
cat "$CSV" | head -n1 | cut -d, -f"$COLS" \
|
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 validate csv file, and on invalid: append error-data instead
|
#goto validate csv file, and on invalid: append error-data instead
|
||||||
|
|
||||||
|
info appending line from "$CSV" of uuid "$UUID"
|
||||||
|
|
||||||
echo -n "$UUID " >> "$DAT"
|
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' \
|
||||||
|
@ -77,4 +103,4 @@ set style data histograms
|
||||||
plot '$DAT' using 3:xtic(1)
|
plot '$DAT' using 3:xtic(1)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
rm "$DAT"
|
#rm "$DAT"
|
||||||
|
|
Loading…
Reference in a new issue