annotate test/sun/tools/jstat/classloadOutput1.awk @ 2467:1474dfa499e3

6959965: jstat: Add new -classload option to print class loading statistics Summary: Add a new jstat -classload option Reviewed-by: alanb
author mchung
date Thu, 10 Jun 2010 14:14:17 -0700
parents
children
rev   line source
mchung@2467 1 #
mchung@2467 2 # matching the following output specified as a pattern that verifies
mchung@2467 3 # that the numerical values conform to a specific pattern, rather than
mchung@2467 4 # specific values.
mchung@2467 5 #
mchung@2467 6 # Loaded Time Inited Time Shared Kbytes LoadTime SysClass Kbytes LoadTime Lookup Parse Linked Time Verified Time AppClass Kbytes AppCL DefineClass Time FindClass Time Delegation URLCL Read
mchung@2467 7 # 956 0.115 777 0.032 0 0.0 0.000 956 3437.5 0.085 0.013 0.045 918 0.032 917 0.011 13 1.0 0.003 1 0.000 1 0.004 0.005 0.000
mchung@2467 8 #
mchung@2467 9
mchung@2467 10 BEGIN {
mchung@2467 11 headerlines=0; datalines=0; totallines=0
mchung@2467 12 }
mchung@2467 13
mchung@2467 14 /^Loaded Time Inited Time Shared Kbytes LoadTime SysClass Kbytes LoadTime Lookup Parse Linked Time Verified Time AppClass Kbytes AppCL DefineClass Time FindClass Time Delegation URLCL Read$/ {
mchung@2467 15 headerlines++;
mchung@2467 16 }
mchung@2467 17
mchung@2467 18 /^[ ]*[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]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ {
mchung@2467 19 datalines++;
mchung@2467 20 }
mchung@2467 21
mchung@2467 22 { totallines++; print $0 }
mchung@2467 23
mchung@2467 24 END {
mchung@2467 25 if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
mchung@2467 26 exit 0
mchung@2467 27 }
mchung@2467 28 else {
mchung@2467 29 exit 1
mchung@2467 30 }
mchung@2467 31 }