stormpot.ManagedPool interface relies on a MetricsRecorder being
configured for the given pool. Stormpot provides no default implementation
of this interface, so by default many of the metrics reporting methods of
the ManagedPool interfaces will return Double.NaN.
Note
that implementations of this class must be thread-safe! Here's an example implementation based on the https://metrics.dropwizard.io/[Dropwizard Metrics library]: [source,java] ---- include::../src/test/java/examples/DropwizardMetricsRecorder.java[lines=16..-1] ----
| Modifier and Type | Method and Description |
|---|---|
| public double | Returns: The latency value in milliseconds for the given percentile/quantile.The percentile/quantile to get a value for. percentile)Get the approximate latency value, in milliseconds, for failed allocation latencies within the given percentile/quantile of what has been recorded so far. |
| public double | Returns: The latency value in milliseconds for the given percentile/quantile.The percentile/quantile to get a value for. percentile)Get the approximate Poolable object allocation latency value, in milliseconds, of the given percentile/quantile of the values recorded so far. |
| public double | Returns: The latency value in milliseconds for the given percentile/quantile.The percentile/quantile to get a value for. percentile)Get the approximate latency value, in milliseconds, for deallocation latencies within the given percentile/quantile of what has been recorded so far. |
| public double | Returns: The latency value in milliseconds for the given percentile/quantile.The percentile/quantile to get a value for. percentile)Get the approximate object lifetime, in milliseconds, for the given percentile/quantile. |
| public double | Returns: The latency value in milliseconds for the given percentile/quantile.The percentile/quantile to get a value for. percentile)Get the approximate latency value, in milliseconds, for failed reallocation latencies within the given percentile/quantile of what has been recorded so far. |
| public double | Returns: The latency value in milliseconds for the given percentile/quantile.The percentile/quantile to get a value for. percentile)Get the approximate latency value, in milliseconds, for reallocation latencies within the given percentile/quantile of what has been recorded so far. |
| public void | recordAllocationFailureLatencySampleMillis(long
How many milliseconds transpired before the allocation
failed. milliseconds)Record a latency sample of a failed allocation, in milliseconds. |
| public void | recordAllocationLatencySampleMillis(long
How many milliseconds it took to successfully
allocate an object. milliseconds)Record a latency sample of a successful allocation, in milliseconds. |
| public void | recordDeallocationLatencySampleMillis(long
How many milliseconds to took to deallocate an object. milliseconds)Record a latency sample of a deallocation, in milliseconds. |
| public void | recordObjectLifetimeSampleMillis(long
How many milliseconds a Poolable object was in
circulation; from it was created, till it was
deallocated. milliseconds)Record an object lifetime sample, in milliseconds. |
| public void | recordReallocationFailureLatencySampleMillis(long
How many milliseconds transpired before the
reallocation failed. milliseconds)Record a latency sample of a failed reallocation, in milliseconds. |
| public void | recordReallocationLatencySampleMillis(long
How many milliseconds it took to successfully
reallocate an object. milliseconds)Record a latency sample of a successful reallocation, in milliseconds. |
| getAllocationFailureLatencyPercentile | back to summary |
|---|---|
| public double getAllocationFailureLatencyPercentile(double percentile) Get the approximate latency value, in milliseconds, for failed allocation latencies within the given percentile/quantile of what has been recorded so far. A percentile, or quantile, is a value between 0.0 and 1.0, both inclusive, which represents a percentage of the recorded samples. In other words, given a percentile, the returned value will be the latency in milliseconds, that the given percent of samples is less than or equal to. For instance, if given the percentile 0.9 returns 120, then 90% of all recorded latency samples will be less than or equal to 120 milliseconds. Note Implementers should strive to return `Double.NaN` as a sentinel value, if they do not support recording of the allocation latencies and/or returning a specific percentile of such recordings.
| |
| getAllocationLatencyPercentile | back to summary |
|---|---|
| public double getAllocationLatencyPercentile(double percentile) Get the approximate Poolable object allocation latency value, in milliseconds, of the given percentile/quantile of the values recorded so far. A percentile, or quantile, is a value between 0.0 and 1.0, both inclusive, which represents a percentage of the recorded samples. In other words, given a percentile, the returned value will be the latency in milliseconds, that the given percent of samples is less than or equal to. For instance, if given the percentile 0.9 returns 120, then 90% of all recorded latency samples will be less than or equal to 120 milliseconds. Note Implementers should strive to return `Double.NaN` as a sentinel value, if they do not support recording of the allocation latencies and/or returning a specific percentile of such recordings.
| |
| getDeallocationLatencyPercentile | back to summary |
|---|---|
| public double getDeallocationLatencyPercentile(double percentile) Get the approximate latency value, in milliseconds, for deallocation latencies within the given percentile/quantile of what has been recorded so far. A percentile, or quantile, is a value between 0.0 and 1.0, both inclusive, which represents a percentage of the recorded samples. In other words, given a percentile, the returned value will be the latency in milliseconds, that the given percent of samples is less than or equal to. For instance, if given the percentile 0.9 returns 120, then 90% of all recorded latency samples will be less than or equal to 120 milliseconds. Note Implementers should strive to return `Double.NaN` as a sentinel value, if they do not support recording of the allocation latencies and/or returning a specific percentile of such recordings.
| |
| getObjectLifetimePercentile | back to summary |
|---|---|
| public double getObjectLifetimePercentile(double percentile) Get the approximate object lifetime, in milliseconds, for the given percentile/quantile. A percentile, or quantile, is a value between 0.0 and 1.0, both inclusive, which represents a percentage of the recorded samples. In other words, given a percentile, the returned value will be the latency in milliseconds, that the given percent of samples is less than or equal to. For instance, if given the percentile 0.9 returns 120, then 90% of all recorded latency samples will be less than or equal to 120 milliseconds. Note Implementers should strive to return `Double.NaN` as a sentinel value, if they do not support recording of the allocation latencies and/or returning a specific percentile of such recordings.
| |
| getReallocationFailurePercentile | back to summary |
|---|---|
| public double getReallocationFailurePercentile(double percentile) Get the approximate latency value, in milliseconds, for failed reallocation latencies within the given percentile/quantile of what has been recorded so far. A percentile, or quantile, is a value between 0.0 and 1.0, both inclusive, which represents a percentage of the recorded samples. In other words, given a percentile, the returned value will be the latency in milliseconds, that the given percent of samples is less than or equal to. For instance, if given the percentile 0.9 returns 120, then 90% of all recorded latency samples will be less than or equal to 120 milliseconds. Note Implementers should strive to return `Double.NaN` as a sentinel value, if they do not support recording of the allocation latencies and/or returning a specific percentile of such recordings.
| |
| getReallocationLatencyPercentile | back to summary |
|---|---|
| public double getReallocationLatencyPercentile(double percentile) Get the approximate latency value, in milliseconds, for reallocation latencies within the given percentile/quantile of what has been recorded so far. A percentile, or quantile, is a value between 0.0 and 1.0, both inclusive, which represents a percentage of the recorded samples. In other words, given a percentile, the returned value will be the latency in milliseconds, that the given percent of samples is less than or equal to. For instance, if given the percentile 0.9 returns 120, then 90% of all recorded latency samples will be less than or equal to 120 milliseconds. Note Implementers should strive to return `Double.NaN` as a sentinel value, if they do not support recording of the allocation latencies and/or returning a specific percentile of such recordings.
| |
| recordAllocationFailureLatencySampleMillis | back to summary |
|---|---|
| public void recordAllocationFailureLatencySampleMillis(long milliseconds) Record a latency sample of a failed allocation, in milliseconds. This is
the time it took for a call to
| |
| recordAllocationLatencySampleMillis | back to summary |
|---|---|
| public void recordAllocationLatencySampleMillis(long milliseconds) Record a latency sample of a successful allocation, in milliseconds.
This is the time it took for a call to
| |
| recordDeallocationLatencySampleMillis | back to summary |
|---|---|
| public void recordDeallocationLatencySampleMillis(long milliseconds) Record a latency sample of a deallocation, in milliseconds. This is the
time it took to complete a call to
| |
| recordObjectLifetimeSampleMillis | back to summary |
|---|---|
| public void recordObjectLifetimeSampleMillis(long milliseconds) Record an object lifetime sample, in milliseconds. This is the time that
transpired from an object was allocated with
| |
| recordReallocationFailureLatencySampleMillis | back to summary |
|---|---|
| public void recordReallocationFailureLatencySampleMillis(long milliseconds) Record a latency sample of a failed reallocation, in milliseconds. This is
the time it took for a call to
| |
| recordReallocationLatencySampleMillis | back to summary |
|---|---|
| public void recordReallocationLatencySampleMillis(long milliseconds) Record a latency sample of a successful reallocation, in milliseconds.
This is the time it took for a call to
| |