public interface CommandLatencyCollector extends MetricCollector<Map<CommandLatencyId,CommandMetrics>>
MetricCollector for command latencies. Command latencies are collected per connection (identified by local/remote
tuples of SocketAddresses) and command type. Two command latencies are available:
| Modifier and Type | Method and Description |
|---|---|
static CommandLatencyCollector |
create(CommandLatencyCollectorOptions options)
Creates a new
CommandLatencyCollector using CommandLatencyCollectorOptions. |
static CommandLatencyCollector |
disabled()
Returns a disabled no-op
CommandLatencyCollector. |
void |
recordCommandLatency(SocketAddress local,
SocketAddress remote,
ProtocolKeyword commandType,
long firstResponseLatency,
long completionLatency)
Record the command latency per
connectionPoint and commandType. |
isEnabled, retrieveMetrics, shutdownstatic CommandLatencyCollector create(CommandLatencyCollectorOptions options)
CommandLatencyCollector using CommandLatencyCollectorOptions.options - must not be null.CommandLatencyCollector using CommandLatencyCollectorOptions.static CommandLatencyCollector disabled()
CommandLatencyCollector.void recordCommandLatency(SocketAddress local, SocketAddress remote, ProtocolKeyword commandType, long firstResponseLatency, long completionLatency)
connectionPoint and commandType.local - the local addressremote - the remote addresscommandType - the command typefirstResponseLatency - latency value in TimeUnit.NANOSECONDS from send to the first responsecompletionLatency - latency value in TimeUnit.NANOSECONDS from send to the command completionCopyright © 2019 lettuce.io. All rights reserved.