I am trying to get more information about timing in Timeline Profiler Timeline, but I can not get anything to appear. According to the documentation I read, it should be as simple as in the following example, but this does not lead to additional information appearing on the timeline.
Do I need to somehow make the profiler aware of the events that I start and stop?
use Symfony\Component\Stopwatch\Stopwatch; class DefaultController extends Controller { public function testAction() { $stopwatch = new Stopwatch(); $stopwatch->start('testController'); usleep(1000000); $response = new Response( '<body>Hi</body>', Response::HTTP_OK, array('content-type' => 'text/html') ); $event = $stopwatch->stop('testController'); return $response; } }
source share