forked from LunarG/VulkanSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvu_csv_stats.sh
executable file
·38 lines (32 loc) · 1.12 KB
/
vu_csv_stats.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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: