public class BooleanCounter extends Counter
Modifier and Type | Field and Description |
---|---|
private boolean |
running |
private boolean[] |
state |
protected int |
total |
Constructor and Description |
---|
BooleanCounter(String name)
Constructor
|
BooleanCounter(String name,
boolean start)
Constructor
|
BooleanCounter(String name,
boolean start,
boolean mergephases)
Constructor
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
phaseChange(int oldPhase)
The phase has changed (from GC to mutator or mutator to GC).
|
protected void |
printCount(int phase)
Print the value of this counter for the given phase
|
void |
printLast()
Print statistics for the most recent phase
|
protected void |
printMax(boolean mutator)
Print the current maximum value for either the mutator or GC phase
|
protected void |
printMin(boolean mutator)
Print the current minimum value for either the mutator or GC phase
|
protected void |
printTotal()
Print the current total number of
true phases for this counter |
protected void |
printTotal(boolean mutator)
Print the current total for either the mutator or GC phase
|
(package private) void |
printValue(int value)
Print the given value
|
void |
set()
Set the boolean to
true for this phase, increment the total. |
protected void |
start()
Start this counter
|
protected void |
stop()
Stop this counter
|
getColumnSuffix, getName, getStart, isComplex, mergePhases
private final boolean[] state
protected int total
private boolean running
public BooleanCounter(String name)
name
- The name to be associated with this counterpublic BooleanCounter(String name, boolean start)
name
- The name to be associated with this counterstart
- true
if this counter is to be implicitly started
when startAll()
is called (otherwise the counter
must be explicitly started).public BooleanCounter(String name, boolean start, boolean mergephases)
name
- The name to be associated with this counterstart
- True if this counter is to be implicitly started
when startAll()
is called (otherwise the counter
must be explicitly started).mergephases
- True if this counter does not separately
report GC and Mutator phases.public void set()
true
for this phase, increment the total.void phaseChange(int oldPhase)
phaseChange
in class Counter
oldPhase
- The last phaseprotected final void printCount(int phase)
false
, '1' for true
.printCount
in class Counter
phase
- The phase to be printedprotected final void printTotal()
true
phases for this counterprintTotal
in class Counter
protected final void printTotal(boolean mutator)
Counter
printTotal
in class Counter
mutator
- true
if the total for the mutator phases is to be
printed (otherwise the total for the GC phases will be printed).protected final void printMin(boolean mutator)
protected final void printMax(boolean mutator)
void printValue(int value)
value
- The value to be printed