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

PHPunit speed up attempt #193

Merged
merged 2 commits into from
Sep 21, 2020
Merged

PHPunit speed up attempt #193

merged 2 commits into from
Sep 21, 2020

Conversation

jorge07
Copy link
Owner

@jorge07 jorge07 commented Sep 21, 2020

Fixes #191

Initial results

docker-compose -f docker-compose.yml -f etc/ci/docker-compose.yml exec -T php sh -lc "./vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
PHPUnit 9.3.0 by Sebastian Bergmann and contributors.

Testing 
...............................................................   63 / 63 (100%)

Time: 08:52.797, Memory: 48.00 MB

OK (63 tests, 130 assertions)

Generating code coverage report in Clover XML format ... done [00:00.050]

Generating code coverage report in HTML format ... done [00:00.374]

Refactoring some code after some blackfire help

docker-compose -f docker-compose.yml -f etc/ci/docker-compose.yml exec -T php sh -lc "./vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
PHPUnit 9.3.0 by Sebastian Bergmann and contributors.

Testing 
...............................................................   63 / 63 (100%)

Time: 07:19.836, Memory: 48.00 MB

OK (63 tests, 130 assertions)

Generating code coverage report in Clover XML format ... done [00:00.038]

Generating code coverage report in HTML format ... done [00:00.345]

After replace coverage from xdebug to pcov

docker-compose -f docker-compose.yml -f etc/ci/docker-compose.yml exec -T php sh -lc "php -dpcov.enabled='1' -dpcov.directory=. -dpcov.exclude='~vendor~' ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
PHPUnit 9.3.0 by Sebastian Bergmann and contributors.

Testing 
...............................................................   63 / 63 (100%)

Time: 00:04.752, Memory: 52.00 MB

OK (63 tests, 130 assertions)

Generating code coverage report in Clover XML format ... done [00:00.022]

Generating code coverage report in HTML format ... done [00:00.231]

@jorge07 jorge07 changed the title PHPunt speed up attempt PHPunit speed up attempt Sep 21, 2020
@jorge07 jorge07 force-pushed the phpunit-speed branch 3 times, most recently from 7c9f426 to 0bcee0c Compare September 21, 2020 07:31
Comment on lines +52 to +55
if (self::isTestSuite()) {
return $plainPassword;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok 👍🏼 . ( Link doesn't work 😞 )

Copy link
Owner Author

Choose a reason for hiding this comment

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

Screenshot 2020-09-21 at 13 19 43

Copy link
Owner Author

Choose a reason for hiding this comment

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

10+5s just encrypting and decrypting

Copy link
Collaborator

@Lutacon Lutacon left a comment

Choose a reason for hiding this comment

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

LGTM.

What a change from xdebug to pcov 👏🏼

@jorge07 jorge07 merged commit 8e52875 into symfony-5 Sep 21, 2020
@jorge07 jorge07 deleted the phpunit-speed branch September 21, 2020 11:28
@jorge07 jorge07 mentioned this pull request Oct 4, 2020
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.

Improve tests suite performance
2 participants