News Feed
Sections




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

Chris Jones:
DTracing a PHPUnit Test Looking at Functional Programming
November 04, 2013 @ 11:04:20

On his Oracle blog Chris Jones has shared more details about using DTrace for dynamic tracing of the execution of your application. In this new post he looks more specifically at using it to trace through a PHPUnit test for a functional programming example.

I was reading the article Functional Programming in PHP by Patkos Csaba and wondering how efficient this type of programming is. I thought this would be a good time to fire up DTrace and see what is going on. Since DTrace is "always available" even in production machines (once PHP is compiled with --enable-dtrace), this was easy to do.

Using the code provided from the other post he sets things up to run some sample tests via PHPUnit. He makes a simple DTrace D script to configure a tracer to watch for "function entry" and "function exit" during execution, outputting the function tree each time when the given function is found (via a parameter). He includes both the command to run the test with the trace and an example of the output result.

0 comments voice your opinion now!
dtrace linux phpunit unittest functional programming example

Link: https://blogs.oracle.com/opal/entry/dtracing_a_phpunit_test_looking

blog comments powered by Disqus

Similar Posts

Tiobe.com: PHP Ranks Fifth in Popularity Contest in August

Justin Silverton\'s Blog: Using sqlite and php

Michelangelo van Dam's Blog: Unit testing with Zend Framework 1.8+

David Soria Parra's Blog: PHP 5.3.99-dev and DTrace Part I

Sebastian Bergmann's Blog: RC2 Is The New RC1 (PHPUnit)


Community Events





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


framework release testing opinion series interview configure refactor laravel install unittest list introduction developer threedevsandamaybe podcast community experience language code

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