Re: Small extension for code coverage
| From: | Christophe Robin | Date: | Wed, 09 Mar 2011 23:21:42 +0000 |
| Subject: | Re: Small extension for code coverage | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8032@lists.php.net to get a copy of this message | ||
On 03/07/2011 06:59 PM, Stas Malyshev wrote:
Hi!Hello, Actually due to some issues with how ticks works, I had to make drastic changes to how the extension works internally for now, meaning that I am now using the exact same format than XDebug: That is the array contains all lines that were executed at least once with 1 as a value ( I am not counting how many hits anymore ). I am not doing deadcode analysis as it has a lot more implications than just hooking on execution and logging line hits; though I may include such functionnality via offline analysis in a futur tool that will transform fastcov's output into a nice HTML report. As for the filename control, what parameters could be useful ? A format like xdebug ? Also I could probably add some metadata in the file itself.I've been working on an extension dedicated to code coverage for the past week. After a lot of work and trials, I managed to get it to work with only a minimal speed loss ( about 10% ). Thanks to Pierre and Felipe for helping me finding some bugs, cleaning the code and making the necessary changes for it to build on Windows.It'd be nice if it would be at least data-compatible with xdebug (then it could be used as drop-in replacement). Right now it's not very clear what it does - i.e., in the readme example, 1 is pretty clear, but what is 2? Does it count how many times each line executed? I'm not sure if it's too useful info, but ok. How about lines that could be executed and weren't vs. lines that never could be executed (comments, dead code, etc.)? It'd also be nice to be able to control auto-write filename (e.g., if I wanted later to group coverage info for certain files).