Skip to content
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 --sequential to valkey-benchmark (for populating entire keyspace) #1839

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

SoftlyRaining
Copy link
Contributor

I needed a way to systematically populate the keyspace before running valkey-benchmark tests like get, so I added a --sequential option that modifies the behavior of -r so that the replacements are sequential numbers in the keyspace instead of random numbers.

Example:

# populate keys by sequentially setting them
./valkey-benchmark -d 512 --sequential -r 3000 -n 3000 -c 650 -P 4 --threads 64 -t set -q

# benchmark get with 100% hit rate
./valkey-benchmark -r 3000 -n 250000 -c 650 -P 4 --threads 64 -t get

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.04%. Comparing base (bcd2f95) to head (f7bf025).

Files with missing lines Patch % Lines
src/valkey-benchmark.c 91.30% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1839      +/-   ##
============================================
+ Coverage     70.97%   71.04%   +0.06%     
============================================
  Files           123      123              
  Lines         65665    65672       +7     
============================================
+ Hits          46608    46655      +47     
+ Misses        19057    19017      -40     
Files with missing lines Coverage Δ
src/valkey-benchmark.c 62.11% <91.30%> (+0.30%) ⬆️

... and 14 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@enjoy-binbin enjoy-binbin added release-notes This issue should get a line item in the release notes major-decision-pending Major decision pending by TSC team labels Mar 12, 2025
Copy link
Member

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems like a good idea.

@madolson
Copy link
Member

@valkey-io/core-team Explicitly pinging yall for votes, as this is a new API on one of our tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-decision-pending Major decision pending by TSC team release-notes This issue should get a line item in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants