Merge branch 'master' of https://github.com/kmcdonell/pcp into kenj-merge
[pcp.git] / qa / group-stats
bloba2b6604dd43c8343e1ff3ecd117c4323c5f17975
1 #!/bin/sh
3 # Report test frequency by group
5 # Sample lines ...
6 # # log rewriting app
7 # pmlogrewrite
9 # 015 pdu local ostest sanity pmstore
12 awk <group '
13 /^\#/ { next }
14 NF == 0 { next }
15 /^[0-9]/ { for (i = 2; i <= NF; i++) {
16 if (f[$i] == "") {
17 if ($i == "remote" || $i == "local" || $i == "sanity" ||
18 $i == "ostest" ||
19 $i ~ /^\#/ || $i ~ /patch/) {
20 # control "groups" or sgi bug numbers
21 continue
23 printf "Warning[%d]: test %s: group \"%s\" not declared\n",NR,$1,$i
25 else
26 f[$i]++
28 next
30 { if ($i == "remote" || $i == "local" || $i == "sanity" ||
31 $i == "ostest")
32 next
33 f[$1] = 0
35 END { for (g in f) {
36 if (f[g] != "")
37 printf "%3d %s\n",f[g],g
39 }' \
40 | sort -k 1,1nr -k2,2