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

39 lines
1.8 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.
#
# -gc 0
#
# S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT CGC CGCT GCT
# 0.0 2048.0 0.0 1079.5 4096.0 0.0 2048.0 0.0 7680.0 7378.6 768.0 664.7 4 0.140 0 0.000 0 0.000 0.140
#
# -J-XX:+UseParallelGC -gc 0
#
# S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT CGC CGCT GCT
# 512.0 512.0 512.0 0.0 6144.0 634.8 5632.0 748.1 8320.0 7851.5 896.0 730.2 4 0.171 0 0.000 - - 0.171
2007-12-01 00:00:00 +00:00
BEGIN {
headerlines=0; datalines=0; totallines=0
}
/^ S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU 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]+\.[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
datalines++;
}
{ totallines++; print $0 }
END {
if ((headerlines == 1) && (datalines == 1)) {
2007-12-01 00:00:00 +00:00
exit 0
}
else {
exit 1
}
}