Add --synthetic_duration option for time-based synthetic workloads#342
Merged
zeke-emerson merged 2 commits intomainfrom Mar 2, 2026
Merged
Add --synthetic_duration option for time-based synthetic workloads#342zeke-emerson merged 2 commits intomainfrom
zeke-emerson merged 2 commits intomainfrom
Conversation
c0d0fa4 to
46da8e0
Compare
dmsmith25
approved these changes
Mar 2, 2026
dmsmith25
left a comment
There was a problem hiding this comment.
Tested locally with and without the --synthetic_duration tag. Both tests succeeded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running synthetic benchmarks for a specific wall-clock duration currently requires calculating the right
--synthetic_requestsvalue (desired_duration * requests_per_sec). This is unintuitive — users just want to say "run for 5 minutes at 10 QPS" without doing math.Solution
Add a
--synthetic_durationCLI option (in seconds) as an alternative to--synthetic_requests. When specified, query iterators yield indefinitely andRunUserchecks a time-based deadline to end the Run phase. The progress bar shows elapsed/total time instead of request counts.Key design decisions:
--synthetic_requests— specifying both produces an error--synthetic_requests=100syntheticandsynthetic-proportional— not supported withsynthetic-runbook(its multi-step structure makes duration splitting complex; can be added later)Files changed:
vsb/cmdline_args.py— new argument + validationvsb/workloads/base.py—synthetic_duration()method on base classvsb/workloads/synthetic_workload/synthetic_workload.py— duration mode forInMemoryWorkload,SyntheticWorkload, andSyntheticProportionalWorkloadvsb/users.py— deadline check inRunUser.do_run(), time-based progress bar inLoadShapeType of Change
Test Plan
poetry run pytest tests/unit)--synthetic_duration=30 --requests_per_sec=10runs for ~30 seconds against Pinecone--synthetic_requests=100(backward compat)--synthetic_durationand--synthetic_requestsproduces an error--synthetic_durationwithsynthetic-runbookproduces an error