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

Fix .cov file format #17

Merged
merged 1 commit into from Oct 14, 2020

Conversation

adrienbrault
Copy link
Contributor

I was trying to phpcov merge 2 ~10MB .cov files generated by this package, and noticed it was suspiciously slow: ~3mn.

Now that the .cov files are generated using SebastianBergmann\CodeCoverage\Report\PHP, phpcov merge takes ~4s.

@matthiasnoback
Copy link
Owner

Very interesting, and nice to hear from you again, Adrien!
Do you have some kind of explanation for this improvement? I'll merge anyway, but I'm just curious.

@matthiasnoback matthiasnoback merged commit 315fe66 into matthiasnoback:master Oct 14, 2020
@matthiasnoback
Copy link
Owner

Released as v1.5.0

@adrienbrault
Copy link
Contributor Author

Here's the beginning of a .cov prior to this patch:

<?php return unserialize('O:43:"SebastianBergmann\\CodeCoverage\\CodeCoverage":15:{s:51:"' . "\0" . 'SebastianBergmann\\CodeCoverage\\CodeCoverage' . "\0" . 'driver";O:48:"SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver":3:{s:56:"' . "\0" . 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' . "\0" . 'filter";O:37:"SebastianBergmann\\CodeCoverage\\Filter":2:{s:44:"' . "\0" . 'SebastianBergmann\\CodeCoverage\\Filter' . "\0" . 'fil

After:

<?php
return \unserialize('O:43:"SebastianBergmann\CodeCoverage\CodeCoverage":15:{s:51:"�SebastianBergmann\CodeCoverage\CodeCoverage�driver";O:48:"SebastianBergmann\CodeCoverage\Driver\PcovDriver":3:{s:56:"�SebastianBergmann\CodeCoverage\Driver\PcovDriver�filter";O:37:"SebastianBergmann\CodeCoverage\Filter":2:{s:44:"�SebastianBergmann\CodeCoverage\Filter�files";a:1627:{s:33:"/application/src/App/.preload.php";b:1;s:67:"/application/src/App/A

So I'm assuming that the performance issue was related to the all the string concatenation/etc.

@matthiasnoback
Copy link
Owner

That makes sense, thanks!

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.

None yet

2 participants