In a previous post, I mentioned the availability of the
dtrace extension for Cool Stack's PHP. Using this extension
and the Cool Stack MySQL, it is possible to analyze the
performance of your application running on this stack. At
JavaOne, we demoed this using the open source MediaWiki and
SugarCRM applications. dtrace is especially useful in
analyzing complex multi-tier applications like AMP. Thanks to
Angelo Rajadurai for the creation of the scripts that I describe
below.
Analyzing PHP calls
So, let's look at a simple dtrace script that counts how many times a particular PHP function is called :
#!/usr/sbin/dtrace -Zqs
php*:::function-entry
/arg0/
{
@[copyinstr(arg0)]=count();
}
You can copy the …
[Read more]