-
Notifications
You must be signed in to change notification settings - Fork 948
Add performance spec tests for queries against large collections #1802
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
@@ -66,7 +66,7 @@ describeSpec( | |||
fromCache: true, | |||
hasPendingWrites: true | |||
}) | |||
.writeAcks(`collection/${i}`, ++currentVersion) | |||
.writeAcks(`collection/${i}`, docRemote.version.toMicroseconds()) | |||
.watchAcksFull(query, ++currentVersion, docRemote) |
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.
Note that in the existing code, this watchAck will get ignored since docRemote.version here is greater than the writeAck version.
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
@@ -47,7 +49,8 @@ const KNOWN_TAGS = [ | |||
]; | |||
|
|||
// TODO(mrschmidt): Make this configurable with mocha options. | |||
const RUN_BENCHMARK_TESTS = false; | |||
const RUN_BENCHMARK_TESTS = true; |
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.
Intentionally enabling these? How long do they take?
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.
Hm. I woke up too early today.
function getTestRunner( | ||
tags, | ||
persistenceEnabled | ||
): ExclusiveTestFunction | PendingTestFunction { |
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.
Neat.
const mode = usePersistence ? '(Persistence)' : '(Memory)'; | ||
const fullName = `${mode} ${name}`; | ||
runner(fullName, async () => { | ||
const testFunction = runner(fullName, async () => { |
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.
Thoughts on renaming testFunction
to queuedTest
or something? I misunderstood what was going on at first.
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.
Renamed
This PR: