public final class SimpleStats extends java.lang.Object implements TimerStats, MeterStats, CounterStats, HistogramStats
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleStats.Type |
TimerStats.Context| Constructor and Description |
|---|
SimpleStats(java.util.concurrent.atomic.AtomicLong statsHolder,
SimpleStats.Type type) |
| Modifier and Type | Method and Description |
|---|---|
void |
dec()
Decrement the counter by one.
|
void |
dec(long n)
Decrement the counter by
n. |
long |
getCount()
Returns the current count.
|
void |
inc()
Increment the counter by one.
|
void |
inc(long n)
Increment the counter by
n. |
void |
mark()
Mark the occurrence of an event.
|
void |
mark(long n)
Mark the occurrence of a given number of events.
|
TimerStats.Context |
time()
Returns a new
TimerStats.Context. |
void |
update(long value)
Adds a recorded value.
|
void |
update(long duration,
java.util.concurrent.TimeUnit unit)
Adds a recorded duration.
|
public SimpleStats(java.util.concurrent.atomic.AtomicLong statsHolder,
SimpleStats.Type type)
public long getCount()
Countingpublic void inc()
CounterStatsinc in interface CounterStatspublic void dec()
CounterStatsdec in interface CounterStatspublic void inc(long n)
CounterStatsn.inc in interface CounterStatsn - the amount by which the counter will be increasedpublic void dec(long n)
CounterStatsn.dec in interface CounterStatsn - the amount by which the counter will be decreasedpublic void mark()
MeterStatsmark in interface MeterStatspublic void mark(long n)
MeterStatsmark in interface MeterStatsn - the number of eventspublic void update(long duration,
java.util.concurrent.TimeUnit unit)
TimerStatsupdate in interface TimerStatsduration - the length of the durationunit - the scale unit of durationpublic TimerStats.Context time()
TimerStatsTimerStats.Context.time in interface TimerStatsTimerStats.ContextTimerStats.Contextpublic void update(long value)
HistogramStatsupdate in interface HistogramStatsvalue - the length of the valueCopyright © 2010 - 2023 Adobe. All Rights Reserved