public abstract class LongCounter extends Counter
| Modifier and Type | Field and Description |
|---|---|
private long[] |
count |
private boolean |
running |
private long |
startValue |
protected long |
totalCount |
| Constructor and Description |
|---|
LongCounter(String name)
Constructor
|
LongCounter(String name,
boolean start)
Constructor
|
LongCounter(String name,
boolean start,
boolean mergephases)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract long |
getCurrentValue() |
(package private) long |
getLastTotal()
Get the total as at the lasts phase
|
protected 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
|
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
|
void |
printTotal()
Print the current total for this counter
|
protected void |
printTotal(boolean mutator)
Print the current total for either the mutator or GC phase
|
(package private) void |
printValue(long value)
Print the given value
|
void |
start()
Start this counter
|
void |
stop()
Stop this counter
|
getColumnSuffix, getName, getStart, isComplex, mergePhases, printLastprivate final long[] count
private long startValue
protected long totalCount
private boolean running
LongCounter(String name)
name - The name to be associated with this counterLongCounter(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).LongCounter(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.protected abstract long getCurrentValue()
protected void phaseChange(int oldPhase)
phaseChange in class CounteroldPhase - The last phaseprotected final void printCount(int phase)
false, '1' for true.printCount in class Counterphase - The phase to be printedpublic final void printTotal()
CounterprintTotal in class Counterlong getLastTotal()
protected final void printTotal(boolean mutator)
CounterprintTotal in class Countermutator - 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)
Counterprotected final void printMax(boolean mutator)
Countervoid printValue(long value)
value - The value to be printed