LATENCY-LATEST(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– latency-latest β€” the 3valkey manual page, but make it cute ✨

okay bestie, pull up a chair 🫢 this is a page from the Valkey Command Manual (that's the 3valkey manual, section 3, we love her) and she is here to tell you everything about LATENCY LATEST. it's giving observability. it's giving "why is my server slow" energy. let's go πŸ’…


🌸 NAME 🌸

latency-latest β€” returns the latest latency samples for all events. that's it. that's the whole job. she's a reporter, not a fixer πŸ’–


✨ SYNOPSIS ✨

LATENCY LATEST

that's it. no args. no options. she ate and left no crumbs πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so the LATENCY LATEST command reports the latest latency events that got logged. like, "hey bestie, here's what was slow recently" πŸ’€

each reported event comes with these fields:

  • event name β€” who did it, basically. the name of the event.
  • unix timestamp of the latest latency spike for that event.
  • latest event latency, measured in milliseconds.
  • all-time maximum latency for this event.
  • sum of the latencies recorded in the time series for this event β€” this one was added in 8.1 ✨
  • number of latency spikes recorded in the time series for this event β€” also added in 8.1 ✨

now, "all-time" is doing a lot of work in that sentence, so let's be clear: it means the maximum latency since the Valkey instance was started, OR since the time that events were reset via LATENCY RESET β€” that's valkey-latency-reset(7) if you wanna look her up 🧚

not me casually resetting my trauma and calling it "all-time" 😭 anyway. facts are facts.

πŸ’œ REPLY πŸ’œ

per valkey-protocol(7), you get an Array reply: an array where each element is a four elements array representing the event's name, timestamp, latest and all-time latency measurements. iconic format. very demure, very mindful πŸŽ€


🌈 COMPLEXITY 🌈

O(1)

constant time. she is fast. main character energy, zero effort, all vibes πŸ‘‘


πŸ‘‘ ACL CATEGORIES πŸ‘‘

  • @admin
  • @dangerous
  • @slow
bestie these are dangerous and admin categories, so pls don't hand this out to just anybody, k? permissions are a love language πŸ’…

πŸŽ€ HISTORY πŸŽ€

  • Available since: 2.8.13 β€” she's been on her grind for a MINUTE, a true veteran πŸ’–

πŸ“ EXAMPLES πŸ“

watch her cook πŸ§‘β€πŸ³

127.0.0.1:6379> debug sleep 1
OK
(1.00s)
127.0.0.1:6379> debug sleep .25
OK
127.0.0.1:6379> latency latest
1) 1) "command"
   2) (integer) 1738651470
   3) (integer) 254
   4) (integer) 1005
   5) (integer) 1259
   6) (integer) 2

see how we slept the server and then asked her to spill? yeah. that's the whole vibe πŸ”₯

for more information refer to the Latency Monitoring Framework page. iykyk ✨


🫢 SEE ALSO 🫢

literally her entire friend group, no cap:


okay that's the whole page, you're officially smarter than you were five minutes ago, slay πŸ’…

this diva is from version 9.0.0, dated 2025-10-21, and she lives in LATENCY-LATEST(3valkey). bye bestie, go check your latencies πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from