-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Added enhanced test-memory.php, originally from react/react #59
Conversation
Thanks, I think it makes sense to get this in 👍 The command arguments appear rather arbitrary to me, so I guess it may make sense to use options similar to reactphp/stream#41? We may also want to reconsider our defaults here. How about this?
Also, while I understand why this is done, should we really default to adding a report every 2s? |
@clue done, that is a great suggestion. Much cleaner this way 👍 . I've also made the report interval configurable When this is in I also want to take some examples from https://github.com/WyriHaximus/ReactBlogSeriesExamples and PR those as examples to this and other applicable repositories |
What's the status here? Ready to merge? |
FYI renamed the file to something better matching the currently included benchmarks |
$t = isset($args['t']) ? (int)$args['t'] : 0; | ||
$loop = isset($args['l']) && class_exists('React\EventLoop\\' . $args['l'] . 'Loop') ? 'React\EventLoop\\' . $args['l'] . 'Loop' : Factory::create(); | ||
|
||
if (!($loop instanceof LoopInterface)) { |
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 that instead of just adding the new
above?
Originally from: https://github.com/reactphp/react/blob/master/examples/test-memory.php
Example output: