|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.excalibur.instrument.AbstractInstrument org.apache.excalibur.instrument.CounterInstrument
CounterInstruments can be used to profile the number of times that something happens. They are perfect for profiling things like the number of times a class instance is created or destroyed. Or the number of times that a method is accessed.
Constructor Summary | |
CounterInstrument(java.lang.String name)
Creates a new CounterInstrument. |
Method Summary | |
void |
increment()
Increments the Instrument. |
void |
increment(int count)
Increments the Instrument by a specified count. |
Methods inherited from class org.apache.excalibur.instrument.AbstractInstrument |
getInstrumentName, getInstrumentProxy, isActive, setInstrumentProxy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CounterInstrument(java.lang.String name)
name
- The name of the Instrument. The value should be a string
which does not contain spaces or periods.Method Detail |
public void increment()
public void increment(int count)
count
- A positive integer to increment the counter by.
java.lang.IllegalArgumentException
- If the count is not positive.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |