fix up tree walking with symlinks for attr
[xfstests-dev.git] / common.metaperf
1 ##/bin/sh
2
3 _format_metaperf()
4 {
5     perl -ne 'm/(\S+): (\d+) times, (\d+) file\(s\) namelen (\d+), time = (\S+) sec, ops\/sec=(\S+), usec\/op = (\S+)/ && { $op{$1} = $7 };
6         END { printf "%8.2f,%8.2f,%8.2f,%8.2f,%8.2f,%8.2f,%8.2f,%8.2f\n",
7                 $op{"chown"}, $op{"create"}, $op{"crunlink"}, $op{"linkun"},
8                 $op{"open"}, $op{"rename"}, $op{"stat"}, $op{"readdir"} }'
9 }
10
11 _format_header()
12 {
13     # note: we're reporting only the usec/op field
14     printf "%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s\n" \
15         chown create crulink linkun open rename stat readdir
16 }
17
18 allops="chown create crunlink linkun open rename stat readdir"