mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Make bench script output clearer for people reading the output first thing in the morning. ;)
This commit is contained in:
@@ -133,8 +133,7 @@ _run_benchmark()
|
||||
_merge_results()
|
||||
{
|
||||
echo Results for $bench benchmark
|
||||
headers=`$here/run.$bench -h`
|
||||
echo "[$headers]"
|
||||
$here/run.$bench -h
|
||||
echo results.$bench.* | sort -nu | xargs cat
|
||||
echo
|
||||
}
|
||||
|
||||
+3
-3
@@ -8,12 +8,12 @@ run_bonnie()
|
||||
mkdir ./bonnie || exit 1
|
||||
defaults="-d ./bonnie -q -f -r 0"
|
||||
defaults="$defaults -u "`id -u`" -g "`id -g`
|
||||
bonnie++ -m '' $defaults $@ >$tmp/bonnie.stdout 2>$tmp/bonnie.stderr
|
||||
bonnie++ -m '' $defaults $@ >$tmp/$$.bonnie.stdout 2>$tmp/$$.bonnie.stderr
|
||||
status=$?
|
||||
rm -fr ./bonnie
|
||||
[ $status -ne 0 ] && exit 1
|
||||
filter_stdout < $tmp/bonnie.stdout
|
||||
filter_stderr < $tmp/bonnie.stderr 1>&2
|
||||
filter_stdout < $tmp/$$.bonnie.stdout
|
||||
filter_stderr < $tmp/$$.bonnie.stderr 1>&2
|
||||
rm -f $tmp/bonnie.stdout $tmp/bonnie.stderr
|
||||
exit 0
|
||||
}
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ run_dbench()
|
||||
# "Throughput 40.6701 MB/sec (NB=50.8376 MB/sec 406.701 MBit/sec)"
|
||||
#
|
||||
if [ $# -gt 0 ]; then
|
||||
echo "clients,MB/sec"
|
||||
printf "%8s, %s\n" clients MB/sec
|
||||
exit 0
|
||||
fi
|
||||
run_dbench | awk 'END { printf "%u,%s\n", '$DBENCH_CLIENTS', $2 }'
|
||||
run_dbench | awk 'END { printf "%8u, %s\n", '$DBENCH_CLIENTS', $2 }'
|
||||
|
||||
+14
-2
@@ -8,6 +8,7 @@
|
||||
BONNIE_FILESIZE=${BONNIE_FILESIZE:=500M}
|
||||
BONNIE_CHUNKSIZE=${BONNIE_CHUNKSIZE:=1K}
|
||||
|
||||
[ -z "$here" ] && here=`pwd`
|
||||
. $here/common.bonnie
|
||||
|
||||
#
|
||||
@@ -28,11 +29,22 @@ filter_stderr()
|
||||
#
|
||||
filter_stdout()
|
||||
{
|
||||
tr -s ',' | sed -e 's/^,//' -e 's/,$//'
|
||||
perl -ne '
|
||||
chomp;
|
||||
s/,+/,/g; s/^,//; s/,$//;
|
||||
@values = split /,/;
|
||||
printf "%9s", shift @values;
|
||||
for ($i = 0; $i <= $#values; $i++) {
|
||||
if ($i % 2) { printf ",%4s%%", $values[$i] }
|
||||
else { printf ",%10s", $values[$i] }
|
||||
}
|
||||
printf "\n";
|
||||
'
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
echo "size:chnk,writeK/s,wCPU,rewriteK/s,rwCPU,readK/s,rCPU,seek/s,sCPU"
|
||||
printf "%9s,%10s,%5s,%10s,%5s,%10s,%5s,%10s,%5s\n" size:chnk \
|
||||
writeK/s wCPU rewriteK/s rwCPU readK/s rCPU seek/s sCPU
|
||||
exit 0
|
||||
fi
|
||||
run_bonnie -n 0 -s $BONNIE_FILESIZE:$BONNIE_CHUNKSIZE
|
||||
|
||||
+14
-2
@@ -15,6 +15,7 @@ BONNIE_NDIRS=${BONNIE_NDIRS:=1}
|
||||
BONNIE_KFILES=${BONNIE_KFILES:=8}
|
||||
BONNIE_FILETYPE=${BONNIE_FILETYPE:=regular}
|
||||
|
||||
[ -z "$here" ] && here=`pwd`
|
||||
. $here/common.bonnie
|
||||
|
||||
#
|
||||
@@ -37,11 +38,22 @@ filter_stderr()
|
||||
#
|
||||
filter_stdout()
|
||||
{
|
||||
tr -d '+' | tr -d \' | tr -s ',' | sed -e 's/^,//' -e 's/,$//'
|
||||
perl -ne '
|
||||
chomp;
|
||||
s/\+*//g; s/,+/,/g; s/^,//; s/,$//;
|
||||
@values = split /,/;
|
||||
printf "%9s", 1024 * shift @values;
|
||||
for ($i = 0; $i <= $#values; $i++) {
|
||||
if ($i % 2) { printf ",%4s%%", $values[$i] }
|
||||
else { printf ",%10s", $values[$i] }
|
||||
}
|
||||
printf "\n";
|
||||
'
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
echo Kfiles/dirs,seqCR/s,scCPU,seqRM/s,srCPU,rndmCR/s,rcCPU,rndmRM/s,rrCPU
|
||||
printf "%9s,%10s,%5s,%10s,%5s,%10s,%5s,%10s,%5s\n" files \
|
||||
seqCR/s scCPU seqRM/s srCPU randCR/s rcCPU randRM/s rrCPU
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
@@ -24,16 +24,16 @@ run_tar()
|
||||
# %U=user %S=system %E=elapsed
|
||||
mkdir ./tar || exit 1
|
||||
size=`ls -Llh $TARFILE | awk '{print $5}'`
|
||||
time=`/usr/bin/time -f '%U,%S,%E' tar xzf $TARFILE 2>&1`
|
||||
time=`/usr/bin/time -f '%U, %S, %E' tar xzf $TARFILE 2>&1`
|
||||
status=$?
|
||||
cd ..
|
||||
rm -fr ./tar
|
||||
[ $status -eq 0 ] || exit 1
|
||||
echo "$size,$time"
|
||||
printf "%6s, %s\n" "$size" "$time"
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
echo "sz,usr,sys,real"
|
||||
printf "%6s,%5s,%5s,%8s\n" sz usr sys real
|
||||
exit 0
|
||||
fi
|
||||
new_tar
|
||||
|
||||
Reference in New Issue
Block a user