private class ProfilerTimerFilter.TimerWorker
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicLong |
callsNumber
The number of calls
|
private java.lang.Object |
lock
A lock for synchinized blocks
|
private java.util.concurrent.atomic.AtomicLong |
maximum
The slowest operation
|
private java.util.concurrent.atomic.AtomicLong |
minimum
The fastest operation
|
private java.util.concurrent.atomic.AtomicLong |
total
The sum of all operation durations
|
| Constructor and Description |
|---|
TimerWorker()
Creates a new instance of TimerWorker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNewDuration(long duration)
Add a new operation duration to this class.
|
double |
getAverage()
Gets the average reading for this event
|
long |
getCallsNumber()
Returns the total number of profiled operations
|
long |
getMaximum()
Returns the longest execution time
|
long |
getMinimum()
Returns the lowest execution time
|
long |
getTotal()
Returns the total time
|
private final java.util.concurrent.atomic.AtomicLong total
private final java.util.concurrent.atomic.AtomicLong callsNumber
private final java.util.concurrent.atomic.AtomicLong minimum
private final java.util.concurrent.atomic.AtomicLong maximum
private final java.lang.Object lock
public void addNewDuration(long duration)
duration - The new operation durationpublic double getAverage()
public long getCallsNumber()
public long getTotal()
public long getMinimum()
public long getMaximum()