diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-11-04 15:46:40 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-11-05 11:21:19 -0500 |
commit | 5ca2daf551a2c631a5f573cb054406f5d49fbef5 (patch) | |
tree | b0a23d34ffdb376bac0b79ed17b5619cfc0d9b47 /src/third_party/wiredtiger/dist/s_stat | |
parent | 017704acdfc7517efadb3fab167bba06c025c01a (diff) | |
download | mongo-5ca2daf551a2c631a5f573cb054406f5d49fbef5.tar.gz |
SERVER-15953: add wiredtiger to third_party
Diffstat (limited to 'src/third_party/wiredtiger/dist/s_stat')
-rw-r--r-- | src/third_party/wiredtiger/dist/s_stat | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/dist/s_stat b/src/third_party/wiredtiger/dist/s_stat new file mode 100644 index 00000000000..152097f14be --- /dev/null +++ b/src/third_party/wiredtiger/dist/s_stat @@ -0,0 +1,33 @@ +#! /bin/sh + +# Complain about unused statistics fields. +t=__wt.$$ +trap 'rm -f $t; exit 0' 0 1 2 3 13 15 + +# List of files to search: skip stat.c, it lists all of the fields by +# definition. +l=`sed \ + -e '/src\/support\/stat.c/d' \ + -e 's,#.*,,' \ + -e '/^$/d' \ + -e 's,^,../,' filelist` +l="$l `echo ../src/include/*.i`" + +( +# Get the list of statistics fields. +search=`sed \ + -e 's/^ WT_STATS \([a-z_*]*\);$/\1/p' \ + -e d ../src/include/stat.h | + sort` + +echo "$search" +fgrep -who "$search" $l) | sort | uniq -u > $t + +test -s $t && { + echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" + echo 'unused statistics fields' + echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" + cat $t + exit 1 +} +exit 0 |