SLOWLOG-LEN(3valkey)

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

πŸ’… SLOWLOG-LEN β€” the Valkey Command Manual moment you didn't know you needed

okay bestie, so this is slowlog-len from the Valkey Command Manual, and it's genuinely one of the most chill commands in the whole book. let's get into it 🫢


✨ NAME ✨

slowlog-len β€” returns the number of entries in the slow log. that's it. that's the whole job. she counts. πŸ‘‘


🌸 SYNOPSIS 🌸

SLOWLOG LEN

literally two words. no args. no drama. no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

This command returns the current number of entries in the slow log. just a number, bestie. that's the whole reply.

so how do entries even get in there? okay so: a new entry is added to the slow log whenever a command exceeds the execution time threshold defined by the slowlog-log-slower-than configuration directive. so if something took too long, it gets written down. it's giving "the group chat screenshots your 3am rambling" energy 😭

and the slow log can't grow forever β€” the maximum number of entries in it is governed by the slowlog-max-len configuration directive. Once the slog log reaches its maximal size, the oldest entry is removed whenever a new entry is created. so it's a little revolving door: new one in, oldest one out, forever and ever, amen. ✨

and if you ever wanna wipe the whole thing clean? that's the SLOWLOG RESET command. bye bye receipts πŸ’€

🌈 Alternative

COMMANDLOG LEN SLOW

yep, that's the alternate spelling for this exact vibe. same energy, different name. iykyk.


πŸ’– REPLY πŸ’–

valkey-protocol(7) Integer reply: the number of entries in the slow log.

translation: you get a whole number back. that's it. that's the tea. πŸ“


⭐ COMPLEXITY ⭐

O(1)

constant time, babes. she does not care how big the slow log is, she will answer instantly. main character energy fr fr.


πŸŽ€ ACL CATEGORIES πŸŽ€

@admin @dangerous @slow

so like β€” @admin means you need admin perms, @dangerous means treat her with respect, and @slow means don't spam her. the trio. the holy trinity. πŸ’…


🧚 HISTORY 🧚

  • Available since: 2.2.12

she's been around since 2.2.12, which is like... ancient in software years. a true icon, no notes. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

go read these next bestie, they're all part of the same little universe:


and that's the whole page, bestie πŸ’– this one shipped as version 9.0.0, dated 2025-10-21 β€” so go forth, count your slow entries, and slay. periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from