FUNCTION-STATS(3valkey)

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

✨ FUNCTION-STATS(3valkey) ✨

okay bestie, welcome to the Valkey Command Manual πŸ’– this is the page for FUNCTION STATS, and yes it's a <pink>3valkey</pink> manual page, we're being so official today πŸŽ€


🌸 NAME 🌸

function-stats β€” the lil command that spills the tea about a function while it's literally running πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

FUNCTION STATS

πŸ’œ DESCRIPTION πŸ’œ

okay so, this one gives you the deets on the function that's currently running plus the deets on all the execution engines you've got available. it's giving backstage pass 🫢

the reply is a map with two keys:

  1. running_script β€” info about the running script. if there's like, no in-flight function at all, the server just replies with a nil</> (nothing, nada, the void πŸ’€). otherwise, it's a map with these keys:
    • name β€” the name of the function ✨
    • command β€” the command and arguments that were used to invoke the function πŸ“
    • duration_ms β€” how long the function has been running, in milliseconds ⏱️
  2. engines β€” this is a map of maps, so maps all the way down 🧚 each entry in the map represents a single engine, and the engine map has stats about that engine, like how many functions and how many libraries it's got πŸ“

you can use this command to peek at a long-running function's invocation and decide whether to kill it with the valkey-function-kill(7) FUNCTION KILL command 😭 dramatic but necessary sometimes.

for more info pls refer to valkey-functions-intro(7) Introduction to Valkey Functions 🌈


πŸ’… REPLY πŸ’…

RESP2

valkey-protocol(7) Array reply: info about the function that's currently running, plus info about the available execution engines πŸ‘‘

RESP3

valkey-protocol(7) Map reply: info about the function that's currently running, plus info about the available execution engines πŸ‘‘


⭐ COMPLEXITY ⭐

O(1) β€” constant time, she's fast, no cap πŸ”₯


πŸŽ€ ACL CATEGORIES πŸŽ€

@scripting @slow


🌈 HISTORY 🌈

  • Available since: 7.0.0 β€” she's been iconic since day one, periodt ✨

🫢 SEE ALSO 🫢

eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-restore(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)


that's the whole page bestie, every flag, every key, every reference, nothing skipped πŸ’– iykyk

Valkey 9.0.0 Β· 2025-10-21 β€” mwah, drink some water, you're doing amazing, and remember: stats first, kill later πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from