public static class StoreTimer.Counter extends Object
StoreTimer.Event
.Modifier and Type | Method and Description |
---|---|
void |
add(StoreTimer.Counter counter)
Add the value of one counter into another counter.
|
int |
getCount()
Get the number of occurrences of the associated event.
|
long |
getTimeNanos()
Get the cumulative time spent on the associated event.
|
void |
increment(int amount)
Add an additional number of occurrences spent performing the associated event.
|
protected StoreTimer.Counter |
makeImmutable()
For internal use during aggregate event computation; the counter can remain mutable until the
computation is completed, then the counter is made immutable, ensuring that other code doesn't
accidentally think it is updating a regular counter.
|
void |
record(long timeDifference)
Add additional time spent performing the associated event.
|
@Nonnull public int getCount()
public long getTimeNanos()
public void record(long timeDifference)
timeDifference
- additional time spent performing the associated eventpublic void increment(int amount)
amount
- additional number of times spent performing the associated eventpublic void add(@Nonnull StoreTimer.Counter counter)
counter
- the other counter to add into this counterprotected StoreTimer.Counter makeImmutable()