5 mkdir ./dbench || exit 1
11 [ $status -ne 0 ] && exit 1
15 # Sample dbench output:
16 # "Throughput 40.6701 MB/sec (NB=50.8376 MB/sec 406.701 MBit/sec)"
19 # Output for a single-shot dbench run.
22 printf "%8s, %s\n" clients MB/sec
27 perl -ne 'm/Throughput (\S+) MB\/sec/ &&
28 { printf "%8u, %s\n", '$clients', $1 }'
31 # Output for a "multipass" dbench run.
32 _format_header_multipass()
34 while [ $# -gt 1 ]; do
35 printf "%4s::MB/sec," $1
38 printf "%4s::MB/sec\n" $1
40 _filter_dbench_multipass()
43 if (m/Throughput (\S+) MB\/sec/) {
44 $results[$count++] = $1;
46 END { for ($i = 0; $i < $count - 1; $i++) {
47 printf "%12.3f,", $results[$i];
49 printf "%12.3f\n", $results[$count-1];