Skip to content

Add benchmarking example - #162

Merged
clue merged 1 commit into
reactphp:masterfrom
clue-labs:benchmark
Apr 7, 2017
Merged

Add benchmarking example#162
clue merged 1 commit into
reactphp:masterfrom
clue-labs:benchmark

Conversation

@clue

@clueclue commented Apr 6, 2017

Copy link
Copy Markdown
Member

It is fast. :shipit:

@clueclue added this to the v0.7.0 milestone Apr 6, 2017
@clue

clue commented Apr 6, 2017

Copy link
Copy Markdown
MemberAuthor

My rather mediocre laptop (Intel i3-5005U CPU @ 2.00GHz) can process around ~2000 requests/s or around 2000 MiB/s per core.

@WyriHaximusWyriHaximus left a comment

Copy link
Copy Markdown
Member

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'));

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
MemberAuthor

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good point 👍

@clue

clue commented Apr 6, 2017

Copy link
Copy Markdown
MemberAuthor

For the reference: The failing tests are unrelated and are being addressed in #163.

jsor
jsor approved these changes Apr 7, 2017
@clue

clue commented Apr 7, 2017

Copy link
Copy Markdown
MemberAuthor

Rebased now that #163 is in :shipit:

@clue
clue merged commit d9eba1b into reactphp:masterApr 7, 2017
@clue
clue deleted the benchmark branch April 7, 2017 09:42
@clueclue mentioned this pull request Jan 29, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@clue@jsor@WyriHaximus