jdk/test/sun/tools/jstat/lineCounts3.awk
author duke
Wed, 05 Jul 2017 17:14:19 +0200
changeset 5570 bfed772dd989
parent 2 90ce3da70b43
child 16502 4ee53f7dc660
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# matching the following output specified as a pattern that verifies
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# that the numerical values conform to a specific pattern, rather than
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
# specific values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
#  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
#  0.00  99.99  66.81   1.24  26.55      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
#  0.00  99.99  68.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
#  0.00  99.99  70.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#  0.00  99.99  70.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
#  0.00  99.99  70.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
#  0.00  99.99  72.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
#  0.00  99.99  72.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
#  0.00  99.99  74.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
#  0.00  99.99  74.81   1.24  27.84      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#  0.00  99.99  76.81   1.24  27.85      1    0.028     0    0.000    0.028
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
BEGIN	{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
	    headerlines=0; datalines=0; totallines=0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
/^  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   $/	{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
	    headerlines++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
	}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
/^[ ]*[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]+$/	{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
	    datalines++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
	}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
	{ totallines++; print $0 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
END	{ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
	    if ((headerlines == 1) && (datalines == 10) && (totallines == 11)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
	        exit 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
	    } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
	        exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
	    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
	}