I am using as simple code as this one.
Just $TIMER['mark']=microtime(TRUE);
all other the code:
<?
$TIMER['start']=microtime(TRUE);
// some code
$TIMER['q1 start']=microtime(TRUE);
$res=mysql_query($query);
$TIMER['q1 end']=microtime(TRUE);
// some code
$TIMER['q2 start']=microtime(TRUE);
$res=mysql_query($query);
$TIMER['q2 end']=microtime(TRUE);
// some code
$TIMER['pagination']=microtime(TRUE);
?>
and then simple table with results:
<?
if ('127.0.0.1' === $_SERVER['REMOTE_ADDR']) {
echo "<table border=1><tr><td>name</td><td>so far</td><td>delta</td><td>per cent</td></tr>";
reset($TIMER);
$start=$prev=current($TIMER);
$total=end($TIMER)-$start;
foreach($TIMER as $name => $value) {
$sofar=round($value-$start,3);
$delta=round($value-$prev,3);
$percent=round($delta/$total*100);
echo "<tr><td>$name</td><td>$sofar</td><td>$delta</td><td>$percent</td></tr>";
$prev=$value;
}
echo "</table><>";
}
?>
It isn't as comprehensive as xDebug output, but it can find a bottleneck and I need nothing more.