|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.utility.statistics.SizeCounter
public class SizeCounter
This class implements a simple counter of events of different sizes (eg object allocations, where total number of objects and total volume of objects would be counted).
The counter is trivially composed from two event counters (one for counting the number of events, the other for counting the volume).
Field Summary | |
---|---|
private EventCounter |
units
|
private EventCounter |
volume
|
Constructor Summary | |
---|---|
SizeCounter(String name)
Constructor |
|
SizeCounter(String name,
boolean start)
Constructor |
|
SizeCounter(String name,
boolean start,
boolean mergephases)
Constructor |
Method Summary | |
---|---|
void |
inc(int value)
Increment the event counter by value |
void |
printCurrentUnits()
Print current (mid-phase) units |
void |
printCurrentVolume()
Print (mid-phase) volume |
void |
printUnits()
Print units |
void |
printVolume()
Print volume |
void |
start()
Start this counter |
void |
stop()
Stop this counter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private EventCounter units
private EventCounter volume
Constructor Detail |
---|
public SizeCounter(String name)
name
- The name to be associated with this counterpublic SizeCounter(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 SizeCounter(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.Method Detail |
---|
public void inc(int value)
value
value
- The amount by which the counter should be incremented.public void start()
public void stop()
public void printCurrentUnits()
public void printCurrentVolume()
public void printUnits()
public void printVolume()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |