News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans' Blog:
Xdebug's Code Coverage speedup
September 23, 2011 @ 09:56:33

Derick Rethans has a new post to his blog today talking about some work that's been done to speed up XDebug's code coverage generation. Changes in the coming 2.2 release have some improvements that make things perform better and put less stress on PHP in the process.

Code coverage tells you how much of your code base is actually being tested by your unit tests. It's a very useful feature, but sadly, it slows down PHP's execution quite a lot. One part of this slowdown is the overhead to record the information internally, but another part is because I have to overload lots of opcodes. (Opcodes are PHP's internal execution units, similar to assembler instructions) They are always overloaded even if code coverage is not used, because it's only safe to overload them for the whole request.

These changes were from a combination of contributions from Taavi Burns and a new ini setting that will allow you to enable or disable the code coverage in XDebug. Benchmarking shows a good amount of time reduction in coverage runs - dropping anywhere from a few seconds to over a minute. He also mentions the idea of "modes", shortcuts to predefined settings for different types of reporting (like "profiling" or "tracing").

0 comments voice your opinion now!
xdebug codecoverage speed improvement opcode contribution benchmark


blog comments powered by Disqus

Similar Posts

Volker Dusch's Blog: Dealing with segfaults while PHPUnit code coverage generation for CI

Sebastian Bergmann's Blog: Benchmark of PHP Branches 3.0 through 5.3-CVS

Matthew Weir O'Phinney's Blog: Getting XDebug working with PHPUnit for code coverage reports

Internet Super Hero: PHP: mysqli_fetch_all()

HowToForge.com: Installing PHP5 Debugger On OpenSUSE 11.3


Community Events

Don't see your event here?
Let us know!


wordpress voicesoftheelephpant api laravel5 extension introduction series threedevsandamaybe language opinion library framework podcast laravel feature community development interview release unittest

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework