This is important to note that the history is based on a sample count and not a time frame. If you set a history to 100 samples and a window of 500ms, you won't have a complete time-frame of 10 seconds. You can have a sample at t0, then another one at t0 + 1 sec depending on when the operations occur.
| Modifier and Type | Field and Description |
|---|---|
| private final Queue | |
| private volatile long | |
| private final AtomicReference | |
| private final Consumer | |
| private final LongSupplier | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | MaximumLatencyHistory(int historySize, long windowSize, TimeUnit windowSizeUnit, LongSupplier timeSupplier)
|
| public | MaximumLatencyHistory(int
The number of samples to keep historySize, long The size of the window over which the reduction is applied. A small value is better for more details, but history might discard values faster. windowSize, TimeUnit Window size unit windowSizeUnit, LongSupplier timeSupplier, Consumer<LatencyPeriodAccumulator> The sink used to collect the old values that are discarded from the history. sink)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | event(long
the clock at event completion in ns timeNs, long the event latency in ns latencyNs)Implements org. |
| public List | |
| public List | history(long
starting point of history in ms sinceMillis)Implements org. |
| private void | |
| public StatisticType | |
| public Long |
| archive | back to summary |
|---|---|
| private final Queue<LatencyPeriodAccumulator> archive | |
| drift | back to summary |
|---|---|
| private volatile long drift | |
| latestAccumulator | back to summary |
|---|---|
| private final AtomicReference<LatencyPeriodAccumulator> latestAccumulator | |
| sink | back to summary |
|---|---|
| private final Consumer<LatencyPeriodAccumulator> sink | |
| timeSupplier | back to summary |
|---|---|
| private final LongSupplier timeSupplier | |
| windowSizeNs | back to summary |
|---|---|
| private final long windowSizeNs | |
| MaximumLatencyHistory | back to summary |
|---|---|
| public MaximumLatencyHistory(int historySize, long windowSize, TimeUnit windowSizeUnit, LongSupplier timeSupplier) | |
| MaximumLatencyHistory | back to summary |
|---|---|
public MaximumLatencyHistory(int historySize, long windowSize, TimeUnit windowSizeUnit, LongSupplier timeSupplier, Consumer<LatencyPeriodAccumulator> sink)
| |
| event | back to summary |
|---|---|
| public void event(long timeNs, long latencyNs) Implements org. Doc from org. Called to indicate an event happened.
| |
| history | back to summary |
|---|---|
| public List Implements org. Doc from org. The history of values | |
| history | back to summary |
|---|---|
| public List Implements org. Doc from org. The history of values, since a given time in ms | |
| insert | back to summary |
|---|---|
| private void insert(LatencyPeriodAccumulator newAccumulator) | |
| type | back to summary |
|---|---|
| public StatisticType type() Implements org.
| |
| value | back to summary |
|---|---|
| public Long value() Implements org.
| |