jdk-24/test/jdk/sun/tools/jstat/lineCounts4.awk

63 lines
3.5 KiB
Awk
Raw Normal View History

2007-12-01 00:00:00 +00:00
#
# matching the following output specified as a pattern that verifies
# that the numerical values conform to a specific pattern, rather than
# specific values.
#
# -gcutil -h 10 0 250 11
#
# S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
# S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
# 0.00 0.00 57.14 47.16 97.09 92.27 5 0.283 51 23.751 2 0.068 24.102
#
# -J-XX:+UseParallelGC -gcutil -h 10 0 250 11
#
# S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
# 0.00 100.00 46.57 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 46.57 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 48.53 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 48.53 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 50.49 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 50.49 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 52.45 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 52.45 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 54.41 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# 0.00 100.00 54.41 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
# S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT
# 0.00 100.00 56.37 14.56 94.70 89.25 5 0.206 0 0.000 - - 0.206
2007-12-01 00:00:00 +00:00
BEGIN {
headerlines=0; datalines=0; totallines=0
datalines2=0;
}
/^ S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT $/ {
2007-12-01 00:00:00 +00:00
headerlines++;
}
/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ {
2007-12-01 00:00:00 +00:00
if (headerlines == 2) {
datalines2++;
}
datalines++;
}
{ totallines++; print $0 }
END {
if ((headerlines == 2) && (datalines == 11) && (datalines2 == 1)) {
2007-12-01 00:00:00 +00:00
exit 0
} else {
exit 1
}
}