Conversation
Signed-off-by: Marco Primi <marco@nats.io>
derekcollison
left a comment
There was a problem hiding this comment.
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.
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.
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.
Should the hardcoded 10 here also be randomized or vary?
Maybe (n % 100) if we want to keep it consistently small?
|
Is this still relevant / for rebasing? |
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 marco@nats.io
Example results: