Skip to content
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

test suite: Add ElemCount to control how many elements are added. #151

Merged
merged 1 commit into from
Feb 15, 2020

Conversation

hsanjuan
Copy link
Contributor

Context: for every subtestQuery the suite Puts 400 elements to the datastore. In the case of go-ds-crdt, every Put is actually about 4 insertions. The final following 400 deletions made during cleanup are actually 400 more insertions (to the Tombstone set). Multiply that for every Subtest and for all the Permutations.

Additionally every test writes the same set of keys over an over, which means that the number of crdt blocks related to every key grows. Every go-ds-crdt Has and Get operations needs to loop over those and triggers related subqueries.

Finally the map datastore is not optimized for prefixed queries so every Query() will loop-and-match ALL the things in the database.

The result is that it takes very long to run these tests for go-ds-crdt. Reducing ElemCount helps significantly.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

@Stebalien Stebalien merged commit b8e7d93 into master Feb 15, 2020
@Stebalien Stebalien deleted the feat/set-count branch February 15, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants