-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Draft] Parametrize 2 Js/Fs benchmarks #5490
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Marco Primi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general love the idea. For this benchmark, subjects and msgs diversity per block really don't matter. We need to do a proper maple tree for this, but for now lookup by sequence which this is testing the first step of that is a modified linear (if small) or binary search.
However, this parametrization will be awesome for subject addressing layer which is way more complicated and is focus for filestore v2.
@derekcollison I'll proceed to parametrize the rest. Once that's done you can supply sensible parameter values that make the most sense to test |
defer fs.mu.RUnlock() | ||
b.ResetTimer() | ||
for i := 0; i < b.N; i++ { | ||
_, mb := fs.selectMsgBlockWithIndex(1 + uint64(i%params.msgCount)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n.b. this was always set to 1 in the original benchmark, now it rolls around, could also be random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the value has meaning for the test or benchmark I try to call it out.
var smv StoreMsg | ||
for i := 0; i < b.N; i++ { | ||
// Needs to start at ~1 to show slowdown. | ||
_, _, err := fs.LoadNextMsg("foo.*", true, 10, &smv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the hardcoded 10
here also be randomized or vary?
Maybe (n % 100)
if we want to keep it consistently small?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this one.
DRAFT for early feedback
Parametrize 2 of the new JetStream FileStore benchmarks to collect more data by running multiple configurations similar-but-different from base-case.
Signed-off-by: Your Name [email protected]
Example results: