Skip to content

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

Merged
Stebalien merged 1 commit intomasterfrom
feat/set-count
Feb 15, 2020
Merged

test suite: Add ElemCount to control how many elements are added.#151
Stebalien merged 1 commit intomasterfrom
feat/set-count

Conversation

@hsanjuan
Copy link
Copy Markdown
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.

@hsanjuan hsanjuan requested a review from Stebalien February 15, 2020 16:12
Copy link
Copy Markdown
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