From 7f0715823c67ec80c99ee5bdffa445e1815096e0 Mon Sep 17 00:00:00 2001 From: Mike Weiblen Date: Wed, 6 Sep 2017 13:41:19 -0600 Subject: 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 --- layers/vu_csv_stats.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 layers/vu_csv_stats.sh 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: -- cgit v1.2.3