-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FUNCTION LOAD
and FCALL
benchmark
#1578
base: unstable
Are you sure you want to change the base?
Conversation
This commit adds two new benhchmarks to `valkey-benchmark` tool. The `FUNCTION LOAD` benchmark evaluates the performance of loading new Lua scripts. This benchmark is parameterized by the number of functions that are present in the script. To control the number of functions we can use the CLI option `--num-functions-in-script`. The `FCALL` benchmarks evaluates the perfomance of calling a Lua function of a previously loaded script. This benchmark is parameterized by the number of keys that are passed in the `FCALL` command. To control the number of keys we can use the CLI option `--num-keys-in-fcall`. Signed-off-by: Ricardo Dias <[email protected]>
I'll be adding more scripting engine related benchmarks to |
while (num_functions > 0) { | ||
assert(buffer_len - written > 0); | ||
if (with_keys) { | ||
written += snprintf(buffer + written, buffer_len - written, |
Check failure
Code scanning / CodeQL
Potentially overflowing call to snprintf High
size argument
"local function foo%u(keys, args)\nreturn keys[0]\nend\n", | ||
num_functions); | ||
} else { | ||
written += snprintf(buffer + written, buffer_len - written, |
Check failure
Code scanning / CodeQL
Potentially overflowing call to snprintf High
size argument
"local function foo%u()\nreturn 0\nend\n", | ||
num_functions); | ||
} | ||
written += snprintf(buffer + written, buffer_len - written, |
Check failure
Code scanning / CodeQL
Potentially overflowing call to snprintf High
size argument
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1578 +/- ##
============================================
- Coverage 70.98% 70.83% -0.16%
============================================
Files 120 121 +1
Lines 65095 65182 +87
============================================
- Hits 46210 46170 -40
- Misses 18885 19012 +127
|
This commit adds two new benhchmarks to
valkey-benchmark
tool.The
FUNCTION LOAD
benchmark evaluates the performance of loading new Lua scripts. This benchmark is parameterized by the number of functions that are present in the script. To control the number of functions we can use the CLI option--num-functions-in-script
.The
FCALL
benchmarks evaluates the perfomance of calling a Lua function of a previously loaded script. This benchmark is parameterized by the number of keys that are passed in theFCALL
command. To control the number of keys we can use the CLI option--num-keys-in-fcall
.