-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add benchmarking example #162
Conversation
My rather mediocre laptop (Intel i3-5005U CPU @ 2.00GHz) can process around ~2000 requests/s or around 2000 MiB/s per core. |
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.
Managed to get 6.4K request/sec and 2GiB/s out of it on a Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
and 8.5K request/sec and 2.6GiB/s on a Intel(R) Xeon(R) CPU E5-1630 v3 @ 3.70GHz
👍
return new Response(404); | ||
} | ||
|
||
$loop->addTimer(0, array($stream, 'resume')); |
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.
Why not use a future tick instead here?
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.
Both would work here 👍 Using a timer here also makes this compatible with react/event-loop:^0.3 though.
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.
Good point 👍
For the reference: The failing tests are unrelated and are being addressed in #163. |
Rebased now that #163 is in |
It is fast.