-
Notifications
You must be signed in to change notification settings - Fork 946
Add Watch update perf test #1059
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
Conversation
2e90f88
to
d0b90ea
Compare
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.
LGTM with nits.
let steps = spec().withGCEnabled(false); | ||
|
||
for (let i = 1; i <= STEP_COUNT; ++i) { | ||
const collPath = `collection/${i}/coll`; |
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.
Why do you use a different subcollection for each step_count ? Please comment.
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.
Added comment. I want the loop iterations to be distinct.
|
||
for (let i = 1; i <= STEP_COUNT; ++i) { | ||
const collPath = `collection/${i}/coll`; | ||
const matchingDoc = doc(`${collPath}/${i}`, ++currentVersion, { |
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.
given you're already using a separate subcollection, does the doc name need to be unique too or could this just be ${collPath}/match or something ?
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.
Yes, that works. Done.
|
||
const queries = []; | ||
|
||
for (let j = 0; j < queriesPerStep; ++j) { |
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.
Comments explaining each section of the test would help me read it faster and be sure I was understanding the intention... E.g.
// Create queriesPerStep listens, each against collPath but with a unique query constraint.
When we have n-updates for n targets, we update the DbTargetGlobal store n times. In the multi-tab branch, this even adds n reads. This perf tests will be used in my follow-up PR that gets rid of these extra updates.
This test is so slow at 100 queries per round that I reduced it to 25.