diff options
| author | Mike Weiblen <mikew@lunarg.com> | 2017-09-06 13:41:19 -0600 |
|---|---|---|
| committer | Mike Weiblen <mikew@lunarg.com> | 2017-09-06 15:13:38 -0600 |
| commit | 7f0715823c67ec80c99ee5bdffa445e1815096e0 (patch) | |
| tree | 90181a8c4ba21eeab9ff4d49e6f2822d3d8ddd96 /layers | |
| parent | 943e000aefad2a32416cf19907afd014925e9037 (diff) | |
| download | usermoji-7f0715823c67ec80c99ee5bdffa445e1815096e0.tar.xz | |
layers: Add script to create VU stats in CSV
A simple utility bash script to generate Valid Usage completion
statistics in CSV format, for loading and analyzing in a spreadsheet.
Change-Id: Id45a20ea83d555029cb11418ac5d19c38fd28a15
Diffstat (limited to 'layers')
| -rwxr-xr-x | layers/vu_csv_stats.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/layers/vu_csv_stats.sh b/layers/vu_csv_stats.sh new file mode 100755 index 00000000..4e794695 --- /dev/null +++ b/layers/vu_csv_stats.sh @@ -0,0 +1,38 @@ +#! /bin/bash +# Basic count stats from the VU database in CSV format for spreadsheet loading. +# Usage: ./vu_csv_stats.sh > stats.csv + +set -o errexit +set -o nounset + +COUNT="grep -c" + +INFILE="./vk_validation_error_database.txt" + +if [ ! -r "$INFILE" ] +then + echo "ERROR: \"$INFILE\" is not readable." >&2 + exit 1 +fi + +echo "\"Generated\",\"`date`\"" +echo "\"Directory\",\"`pwd -P`\"" +echo "\"Commit\",\"$(git describe --all --long)\"" +echo +echo "\"All VUs\"" +echo "\"\",\"Total\",$($COUNT '^VALIDATION_ERROR_' $INFILE)" +echo "\"\",\"Done (Y)\",$($COUNT '~^~Y~^~' $INFILE)" +echo "\"\",\"Not done (N)\",$($COUNT '~^~N~^~' $INFILE)" +echo "\"\",\"Unknown (U)\",$($COUNT '~^~U~^~' $INFILE)" +echo +echo "\"Implicit VUs\"" +echo "\"\",\"Total\",$($COUNT 'implicit' $INFILE)" +echo "\"\",\"Done (Y)\",$(grep 'implicit' $INFILE | $COUNT '~^~Y~^~')" +echo "\"\",\"Not done (N)\",$(grep 'implicit' $INFILE | $COUNT '~^~N~^~')" +echo +echo "\"Tests\"" +echo "\"\",\"None\",$($COUNT '~^~None~^~' $INFILE)" +echo "\"\",\"Unknown\",$($COUNT '~^~Unknown~^~' $INFILE)" +echo "\"\",\"NotTestable\",$($COUNT '~^~NotTestable~^~' $INFILE)" + +# vim: set sw=4 ts=8 et ic ai: |
