public class MicrometerCommandLatencyRecorder extends Object implements CommandLatencyRecorder
CommandLatencyRecorder
Constructor and Description |
---|
MicrometerCommandLatencyRecorder(io.micrometer.core.instrument.MeterRegistry meterRegistry,
MicrometerOptions options)
|
Modifier and Type | Method and Description |
---|---|
protected io.micrometer.core.instrument.Timer |
completionTimer(CommandLatencyId commandLatencyId) |
protected io.micrometer.core.instrument.Timer |
firstResponseTimer(CommandLatencyId commandLatencyId) |
boolean |
isEnabled()
Returns
true if the metric collector is enabled. |
void |
recordCommandLatency(SocketAddress local,
SocketAddress remote,
ProtocolKeyword commandType,
long firstResponseLatency,
long completionLatency)
Record the command latency per
connectionPoint and commandType . |
void |
recordCommandLatency(SocketAddress local,
SocketAddress remote,
RedisCommand<?,?,?> redisCommand,
long firstResponseLatency,
long completionLatency)
Record the command latency per
connectionPoint and commandType . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disabled
public MicrometerCommandLatencyRecorder(io.micrometer.core.instrument.MeterRegistry meterRegistry, MicrometerOptions options)
meterRegistry
- options
- public void recordCommandLatency(SocketAddress local, SocketAddress remote, RedisCommand<?,?,?> redisCommand, long firstResponseLatency, long completionLatency)
CommandLatencyRecorder
connectionPoint
and commandType
.recordCommandLatency
in interface CommandLatencyRecorder
local
- the local addressremote
- the remote addressredisCommand
- the commandfirstResponseLatency
- latency value in TimeUnit.NANOSECONDS
from send to the first
responsecompletionLatency
- latency value in TimeUnit.NANOSECONDS
from send to the command
completionpublic void recordCommandLatency(SocketAddress local, SocketAddress remote, ProtocolKeyword commandType, long firstResponseLatency, long completionLatency)
CommandLatencyRecorder
connectionPoint
and commandType
.recordCommandLatency
in interface CommandLatencyRecorder
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
completionpublic boolean isEnabled()
CommandLatencyRecorder
true
if the metric collector is enabled.isEnabled
in interface CommandLatencyRecorder
true
if the metric collector is enabledprotected io.micrometer.core.instrument.Timer completionTimer(CommandLatencyId commandLatencyId)
protected io.micrometer.core.instrument.Timer firstResponseTimer(CommandLatencyId commandLatencyId)
Copyright © 2023 lettuce.io. All rights reserved.