@Experimental public class HotkeysReply extends Object
| Constructor and Description |
|---|
HotkeysReply(boolean trackingActive,
int sampleRatio,
List<Range<Integer>> selectedSlots,
Long sampledCommandSelectedSlotsUs,
Long allCommandsSelectedSlotsUs,
Long allCommandsAllSlotsUs,
Long netBytesSampledCommandsSelectedSlots,
Long netBytesAllCommandsSelectedSlots,
Long netBytesAllCommandsAllSlots,
Long collectionStartTimeUnixMs,
Long collectionDurationMs,
Long totalCpuTimeUserMs,
Long totalCpuTimeSysMs,
Long totalNetBytes,
Map<String,Long> byCpuTimeUs,
Map<String,Long> byNetBytes)
Creates a new
HotkeysReply. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Long |
getAllCommandsAllSlotsUs() |
Long |
getAllCommandsSelectedSlotsUs() |
Map<String,Long> |
getByCpuTimeUs() |
Map<String,Long> |
getByNetBytes() |
Long |
getCollectionDurationMs() |
Long |
getCollectionStartTimeUnixMs() |
Long |
getNetBytesAllCommandsAllSlots() |
Long |
getNetBytesAllCommandsSelectedSlots() |
Long |
getNetBytesSampledCommandsSelectedSlots() |
Long |
getSampledCommandSelectedSlotsUs() |
int |
getSampleRatio() |
List<Range<Integer>> |
getSelectedSlots()
Returns the selected slot ranges for which hotkeys data was collected.
|
Long |
getTotalCpuTimeSysMs() |
Long |
getTotalCpuTimeUserMs() |
Long |
getTotalNetBytes() |
int |
hashCode() |
boolean |
isTrackingActive() |
String |
toString() |
public HotkeysReply(boolean trackingActive,
int sampleRatio,
List<Range<Integer>> selectedSlots,
Long sampledCommandSelectedSlotsUs,
Long allCommandsSelectedSlotsUs,
Long allCommandsAllSlotsUs,
Long netBytesSampledCommandsSelectedSlots,
Long netBytesAllCommandsSelectedSlots,
Long netBytesAllCommandsAllSlots,
Long collectionStartTimeUnixMs,
Long collectionDurationMs,
Long totalCpuTimeUserMs,
Long totalCpuTimeSysMs,
Long totalNetBytes,
Map<String,Long> byCpuTimeUs,
Map<String,Long> byNetBytes)
HotkeysReply.trackingActive - whether tracking is currently active.sampleRatio - the sampling ratio.selectedSlots - the selected slot ranges; consecutive slots are grouped into ranges, single slots are represented as
ranges where lower equals upper (e.g., Range.create(100, 100)); empty if all slots were selected.sampledCommandSelectedSlotsUs - CPU time for sampled commands on selected slots in microseconds (nullable).allCommandsSelectedSlotsUs - CPU time for all commands on selected slots in microseconds (nullable).allCommandsAllSlotsUs - CPU time for all commands on all slots in microseconds.netBytesSampledCommandsSelectedSlots - network bytes for sampled commands on selected slots (nullable).netBytesAllCommandsSelectedSlots - network bytes for all commands on selected slots (nullable).netBytesAllCommandsAllSlots - network bytes for all commands on all slots.collectionStartTimeUnixMs - collection start time in Unix milliseconds.collectionDurationMs - collection duration in milliseconds.totalCpuTimeUserMs - total CPU user time in milliseconds.totalCpuTimeSysMs - total CPU system time in milliseconds.totalNetBytes - total network bytes.byCpuTimeUs - top K keys by CPU time in microseconds (key -> microseconds).byNetBytes - top K keys by network bytes (key -> bytes).public boolean isTrackingActive()
public int getSampleRatio()
public List<Range<Integer>> getSelectedSlots()
Redis groups consecutive slots into ranges. For example, if slots 0, 1, 2, and 100 were selected, Redis returns them as
two entries: [[0, 2], [100]]. This method represents each entry as a Range:
Range.create(start, end), e.g., Range.create(0, 2)Range.create(slot, slot), e.g., Range.create(100, 100)range.getLower().getValue().equals(range.getUpper().getValue()).public Long getSampledCommandSelectedSlotsUs()
public Long getAllCommandsSelectedSlotsUs()
public Long getAllCommandsAllSlotsUs()
public Long getNetBytesSampledCommandsSelectedSlots()
public Long getNetBytesAllCommandsSelectedSlots()
public Long getNetBytesAllCommandsAllSlots()
public Long getCollectionStartTimeUnixMs()
public Long getCollectionDurationMs()
public Long getTotalCpuTimeUserMs()
public Long getTotalCpuTimeSysMs()
public Long getTotalNetBytes()
Copyright © 2026 lettuce.io. All rights reserved.