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

Added enhanced test-memory.php, originally from react/react #59

Merged
merged 4 commits into from
Jul 26, 2017

Conversation

WyriHaximus
Copy link
Member

@WyriHaximus WyriHaximus commented Nov 13, 2016

@clue
Copy link
Member

clue commented Nov 14, 2016

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?

php examples/benchmark-periodic-timers.php -t 5 -l StreamSelect

Also, while I understand why this is done, should we really default to adding a report every 2s?

@WyriHaximus
Copy link
Member Author

WyriHaximus commented Nov 14, 2016

@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

@jsor
Copy link
Member

jsor commented Feb 8, 2017

What's the status here? Ready to merge?

@WyriHaximus WyriHaximus requested a review from clue July 26, 2017 07:17
@WyriHaximus
Copy link
Member Author

FYI renamed the file to something better matching the currently included benchmarks

@WyriHaximus WyriHaximus merged commit 2ae058d into reactphp:master Jul 26, 2017
@WyriHaximus WyriHaximus added this to the v0.5.0 milestone Jul 26, 2017
$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)) {
Copy link
Contributor

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?

Sign up for free to 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.

4 participants