Skip to content

Benchmark tool #486

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

Merged
merged 7 commits into from
May 21, 2021
Merged

Benchmark tool #486

merged 7 commits into from
May 21, 2021

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented May 20, 2021

Partly for #245

@dai-shi dai-shi requested a review from Aslemammad May 20, 2021 13:51
@vercel
Copy link

vercel bot commented May 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/jotai/BBbHWw6r5ey464Mwy4BjRTnjnmx6
✅ Preview: https://jotai-git-benchmark-tool-pmndrs.vercel.app

@dai-shi
Copy link
Member Author

dai-shi commented May 20, 2021

simple-read.ts is to show how to use the tool.

npx ts-node ./benchmarks/simple-read.ts
...
jq -r '[.results[0].name,.results[0].ops]|@csv' benchmarks/simple-read-*.json
"atoms=100",6528284
"atoms=1000",5508216
"atoms=10000",6301191
"atoms=100000",4776814
"atoms=1000000",4539427

image

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 20, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7da18d1:

Sandbox Source
React Configuration
React Typescript Configuration

@dai-shi
Copy link
Member Author

dai-shi commented May 21, 2021

npx ts-node ./benchmarks/simple-write.ts
...
jq -r '[.results[0].name,.results[0].ops]|@csv' benchmarks/simple-write-*.json
"atoms=100",1178969
"atoms=1000",1050401
"atoms=10000",1107396
"atoms=100000",1002460
"atoms=1000000",947639

image

Copy link
Member

@Aslemammad Aslemammad left a comment

Choose a reason for hiding this comment

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

Looks good to me, a good inspiration; I'm getting react-redux-benchmarks done.

@dai-shi
Copy link
Member Author

dai-shi commented May 21, 2021

npx ts-node ./benchmarks/subscribe-write.ts
...
jq -r '[.results[0].name,.results[0].ops]|@csv' benchmarks/subscribe-write-*.json
"atoms=100",379557
"atoms=1000",357439
"atoms=10000",374887
"atoms=100000",357717
"atoms=1000000",227648

image

@dai-shi dai-shi marked this pull request as ready for review May 21, 2021 23:13
@dai-shi
Copy link
Member Author

dai-shi commented May 21, 2021

Let's merge this and we can continue adding more complex scenarios later on.

@dai-shi dai-shi merged commit c2b7a69 into master May 21, 2021
@dai-shi dai-shi deleted the benchmark-tool branch May 21, 2021 23:15
@dai-shi
Copy link
Member Author

dai-shi commented May 21, 2021

I made a chart for linear axis instead of logarithmic axis.
This is out of subscribe-write and I stopped the node process each time.

image

The result is not very nice. I see it drops roughly linearly.

@dai-shi
Copy link
Member Author

dai-shi commented May 22, 2021

Trying with smaller size of atoms.

image

Hm, it looks about constant.

@dai-shi
Copy link
Member Author

dai-shi commented May 22, 2021

image

A little drop?

So much for now.

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