public class PerHostPercentileTracker extends PercentileTracker
PercentileTracker
that maintains a separate histogram for each host.
This gives you per-host latency percentiles, meaning that each host will only be compared to itself.
Modifier and Type | Class and Description |
---|---|
static class |
PerHostPercentileTracker.Builder
Helper class to build
PerHostPercentileTracker instances with a fluent interface. |
Modifier and Type | Method and Description |
---|---|
static PerHostPercentileTracker.Builder |
builder(long highestTrackableLatencyMillis)
Returns a builder to create a new instance.
|
protected Host |
computeKey(Host host,
Statement statement,
Exception exception)
Computes a key used to categorize measurements.
|
getLatencyAtPercentile, include, onRegister, onUnregister, update
protected Host computeKey(Host host, Statement statement, Exception exception)
PercentileTracker
It's recommended to keep the number of distinct keys low, in order to limit the memory footprint of the histograms.
computeKey
in class PercentileTracker
host
- the host that was queried.statement
- the statement that was executed.exception
- if the query failed, the corresponding exception.public static PerHostPercentileTracker.Builder builder(long highestTrackableLatencyMillis)
highestTrackableLatencyMillis
- the highest expected latency. If a higher value is
reported, it will be ignored and a warning will be logged. A good rule of thumb is to set
it slightly higher than SocketOptions.getReadTimeoutMillis()
.Copyright © 2012–2024. All rights reserved.