View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001144||Xdebug||Feature/Change request||public||2015-04-16 07:42||2016-12-13 21:32|
|Target Version||Fixed in Version|
|Summary||0001144: Add support for filtering of files for code coverage|
|Description||At the moment, Xdebug returns code coverage for all files from which code is executed between xdebug_start_code_coverage() and xdebug_end_code_coverage().|
PHP_CodeCoverage takes the raw data that is returned from xdebug_get_code_coverage() and filters it, ie. removes non-whitelisted files when a whilelist is configured or removes blacklisted files when a blacklist is used.
The analysis that is performed by Xdebug when XDEBUG_CC_BRANCH_CHECK is set is an expensive operation that is uselessly performed for code that a user of PHPUnit / PHP_CodeCoverage is not interested in (the code of PHPUnit and its dependencies, for instance).
It would be beneficial for performance reasons to move the blacklist / whitelist filtering from PHP_CodeCoverage to Xdebug.
|Tags||No tags attached.|
By the way: I do not think that it would be a good idea to pass the list of whitelisted or blacklisted files to Xdebug with every call to xdebug_start_code_coverage().
There should be two new functions, xdebug_set_code_coverage_blacklist() and xdebug_set_code_coverage_whitelist(), that can be used to configure the filter. This way the data needs to be passed from userland to Xdebug only once.
Is there any plan to work on this ? This would be a huge help when collecting coverage for a functional testsuite.
Slowing down Symfony, Doctrine and all my other deps to collect code coverage on them while PHPunit will then filter all this data out is just a waste of time (and I'm talking about going from a few minutes without coverage to a few hours with coverage enabled on Xdebug 2.3)
||Most definitely. Probably on a plane or something. However, I want to have PHP 7 support sort of working first!|
Well, to be honest, I'm more interested in getting a usable code coverage reporting on my PHP 5.6 setup (i.e. not taking hours to run my tests with code coverage) than having support for PHP 7 yet (even though it will also be great) :)
If I knew C (and had more time as my own OSS projects are already missing attention currently), I would even consider contributing to this. But my C knowledge is approximately equivalent to building a HelloWorld displayed in STDOUT, so I fear it won't be enough...
is there any plan to implement this now that PHP 7 support is out ?
On a side note, PHPUnit only needs whitelisting support now rather than blacklisting, as PHPUnit 5 removed the blacklisting
||Derick: Is this still on your TODO?|
||Yes, most definitely!|
||Duplicate of 0001059, which was requested first.|
|2015-04-16 07:42||sebastian||New Issue|
|2015-04-16 07:48||sebastian||Note Added: 0003071|
|2015-06-25 13:38||stof||Note Added: 0003130|
|2015-06-25 14:33||derick||Note Added: 0003131|
|2015-06-25 14:41||stof||Note Added: 0003136|
|2015-11-22 09:02||derick||Target Version||=> 2.5.0dev|
|2016-05-12 17:25||stof||Note Added: 0003602|
|2016-11-28 21:39||sebastian||Note Added: 0003834|
|2016-11-28 23:36||derick||Note Added: 0003839|
|2016-11-28 23:36||derick||Assigned To||=> derick|
|2016-11-28 23:36||derick||Status||new => confirmed|
|2016-12-04 18:34||derick||Target Version||2.5.0dev =>|
|2016-12-13 21:32||derick||Note Added: 0004049|
|2016-12-13 21:32||derick||Status||confirmed => resolved|
|2016-12-13 21:32||derick||Resolution||open => duplicate|