The stopwatch component
Since Symfony 2.2, the stopwatch component has been included in the standard Symfony. It allows you to measure time used in your various code fragments. You can add your own entries to the timeline
section of the profile.
Amend the controller code as follows:
// src/AppBundle/Controller/TaskController $watch = $this->get('debug.stopwatch'); $watch->start('Fetching Tasks'); $tasks = $em->getRepository('AppBundle:Task') ->createQueryBuilder('t') ->where('t.finished = :finished') ->andWhere('t.user = :user') ->orderBy('t.due_date', 'ASC') ->setParameter('finished', false) ->setParameter('user', $this->getUser()) ->getQuery() ->getResult(); $watch->stop('Fetching Tasks');
Now, when you refresh...