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(store-sync): benchmark storage adapters #2206

Merged
merged 29 commits into from
Feb 1, 2024
Merged

Conversation

yonadaaa
Copy link
Contributor

@yonadaaa yonadaaa commented Jan 29, 2024

Adds benchmarks comparing RECS, Zustand and SQLite when:

  • hydrating storage adapters
  • fetching a single record
  • fetching all records in a table

Each benchmark is run for 10, 100, 1000 records. The logs for these records are generated in e2e and saved in files as it is awkward/impractical to regenerate them in the benchmark environment.

In future we can add more benchmarks (like comparing runQuery), and polish the benchmarking suites with Vitest hooks.

Results

Hydration

image

Fetching a single record

image

Fetching all records in a table

image

Copy link

changeset-bot bot commented Jan 29, 2024

⚠️ No Changeset found

Latest commit: a439764

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@yonadaaa
Copy link
Contributor Author

Hooks (beforeAll etc.) are being added for Vitest benchmarks which will make our test setup better: vitest-dev/vitest#5076

holic
holic previously approved these changes Feb 1, 2024
Copy link
Member

@holic holic left a comment

Choose a reason for hiding this comment

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

nice! describe.each feels a lot nicer

@holic holic changed the title test(store-sync): stress benchmark storage adapters test(store-sync): benchmark storage adapters Feb 1, 2024
@yonadaaa yonadaaa requested a review from holic February 1, 2024 15:28
@holic holic merged commit ca5e762 into main Feb 1, 2024
11 checks passed
@holic holic deleted the yonadaaa/benchmark-large-data branch February 1, 2024 16:21
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.

None yet

3 participants