jdk/test/sun/tools/jstatd/jstatGcutilOutput1.awk
changeset 21507 624a61211dd7
parent 21506 115e1128ce1a
parent 21474 4d9ae2ec8ba6
child 21508 3dd9732b1703
equal deleted inserted replaced
21506:115e1128ce1a 21507:624a61211dd7
     1 #
       
     2 # matching the following output specified as a pattern that verifies
       
     3 # that the numerical values conform to a specific pattern, rather than
       
     4 # specific values.
       
     5 #
       
     6 #  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   
       
     7 #  0.00 100.00  56.99   7.81  95.03  87.56      1    0.009     0    0.000    0.009
       
     8 #  0.00 100.00  63.64   7.81  95.03  87.56      1    0.009     0    0.000    0.009
       
     9 #  0.00 100.00  64.68   7.81  95.03  87.56      1    0.009     0    0.000    0.009
       
    10 #  0.00 100.00  65.73   7.81  95.03  87.56      1    0.009     0    0.000    0.009
       
    11 #  0.00 100.00  67.22   7.81  95.03  87.56      1    0.009     0    0.000    0.009
       
    12 
       
    13 BEGIN	{
       
    14 	    headerlines=0; datalines=0; totallines=0
       
    15 	}
       
    16 
       
    17 /^  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   $/	{
       
    18 	    headerlines++;
       
    19 	}
       
    20 
       
    21 /^[ ]*[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]+$/	{
       
    22 	    datalines++;
       
    23 	}
       
    24 
       
    25 	{ totallines++; print $0 }
       
    26 
       
    27 END	{
       
    28 	    if ((headerlines == 1) && (datalines == 5) && (totallines == 6)) {
       
    29 	        exit 0
       
    30             }
       
    31             else {
       
    32 	        exit 1
       
    33             }
       
    34 	}