Code snippets for symfony 1.x

Navigation

Refine Tags

Snippets tagged "speed"

Using timers to profile functions speed

This snippet allows you to evaluate functions speed and display them in symfony debug bar.

$timer = sfTimerManager::getTimer ('ldap_request'); // Create and start a new timer
 
// do some stuff
 
$timer->addTime (); // stop and store the timer value
 
by Arnaud Didry on 2009-06-22, tagged performance  profile  speed 
(2 comments)