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 "${DATA_DIR}" ] && die "The --data-dir option must be specified"
|
||||
|
||||
BIN_REL="$1"
|
||||
[ -z "${BIN_REL}" ] && \
|
||||
BIN="$1"
|
||||
[ -z "${BIN}" ] && \
|
||||
die "The main binarys localpath must be given as the first positional argument"
|
||||
BIN_EXT=$(echo "$BIN" | sed 's/.*\.\(.*\)/\1/')
|
||||
|
||||
# >>> CONFIGURE PER SYSTEM
|
||||
SERVER="starand"
|
||||
|
@ -99,9 +100,6 @@ SERVER_DIR="0tmp/robur_perftest"
|
|||
|
||||
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"
|
||||
|
|
|
@ -2,6 +2,29 @@
|
|||
|
||||
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"
|
||||
CACHE_DIR="$2"
|
||||
DB="$3"
|
||||
|
@ -14,11 +37,12 @@ COLS=5,7,8 #resp-time, throughput, concurrent
|
|||
|
||||
DAT="${PERFJOB_DIR}/tmp.dat"
|
||||
|
||||
#> Note: ordering desc for plot ordering left->right
|
||||
get_jobs_build-uuids () {
|
||||
sqlite3 "$DB" "select b.uuid from build as b \
|
||||
join job as j on j.id = b.job\
|
||||
where j.name = '$JOB' \
|
||||
order by b.id asc"
|
||||
order by b.id desc"
|
||||
}
|
||||
|
||||
get_bin_hash () {
|
||||
|
@ -36,21 +60,23 @@ while read -r UUID; do
|
|||
CSV="${PERFJOB_DIR}/${BIN_SHA256}/siege_test01.csv"
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
if [ $N = 1 ]; then
|
||||
echo -n "# Build UUID - "
|
||||
if [ $N = 0 ]; then
|
||||
echo -n "# Build UUID - " > "$DAT"
|
||||
cat "$CSV" | head -n1 | cut -d, -f"$COLS" \
|
||||
| sed 's/,//g' \
|
||||
| sed 's/ \+//' \
|
||||
| sed 's/\( \+\)/ -\1/g' \
|
||||
> "$DAT"
|
||||
>> "$DAT"
|
||||
fi
|
||||
|
||||
#goto validate csv file, and on invalid: append error-data instead
|
||||
|
||||
info appending line from "$CSV" of uuid "$UUID"
|
||||
|
||||
echo -n "$UUID " >> "$DAT"
|
||||
cat "$CSV" | tail +2 | cut -d, -f"$COLS" \
|
||||
| sed 's/,//g' \
|
||||
|
@ -77,4 +103,4 @@ set style data histograms
|
|||
plot '$DAT' using 3:xtic(1)
|
||||
EOF
|
||||
|
||||
rm "$DAT"
|
||||
#rm "$DAT"
|
||||
|
|
Loading…
Reference in a new issue