mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
d4d5d06c1e
functional tests we have. Aim is to get wind of performance regressions as changes are checked in, rather than at some arbitrary point down the track. Still a bit of work to do wrt this framework though.
25 lines
506 B
Bash
Executable File
25 lines
506 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Does a dbench run (10 clients if $DBENCH_CLIENTS is not set),
|
|
# then massages the output into CSV format.
|
|
#
|
|
DBENCH_CLIENTS=${DBENCH_CLIENTS:=10}
|
|
|
|
run_dbench()
|
|
{
|
|
mkdir ./dbench || exit 1
|
|
dbench $DBENCH_CLIENTS || exit 1
|
|
rm -fr ./dbench || exit 1
|
|
}
|
|
|
|
# dbench gives:
|
|
# "Throughput 40.6701 MB/sec (NB=50.8376 MB/sec 406.701 MBit/sec)"
|
|
#
|
|
if [ $# -gt 0 ]; then
|
|
echo "clients,MB/sec"
|
|
exit 0
|
|
fi
|
|
run_dbench | perl -ne \
|
|
'if (m/^Throughput (\S+) /) { print '$DBENCH_CLIENTS',",",$1,"\n"; }'
|
|
|