private function ContainerAwareTraceableEventDispatcher::saveStopwatchInfoInProfile

Update the profiles with the timing info and saves them.

Parameters

Profile $profile The root profile:

Boolean $updateChildren Whether to update the children altogether:

1 call to ContainerAwareTraceableEventDispatcher::saveStopwatchInfoInProfile()
ContainerAwareTraceableEventDispatcher::updateProfiles in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ContainerAwareTraceableEventDispatcher.php
Updates the stopwatch data in the profile hierarchy.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ContainerAwareTraceableEventDispatcher.php, line 294

Class

ContainerAwareTraceableEventDispatcher
Extends the ContainerAwareEventDispatcher to add some debugging tools.

Namespace

Symfony\Component\HttpKernel\Debug

Code

private function saveStopwatchInfoInProfile(Profile $profile, $updateChildren) {
  $profile
    ->getCollector('time')
    ->setEvents($this->stopwatch
    ->getSectionEvents($profile
    ->getToken()));
  $this->profiler
    ->saveProfile($profile);
  if ($updateChildren) {
    foreach ($profile
      ->getChildren() as $child) {
      $this
        ->saveStopwatchInfoInProfile($child, true);
    }
  }
}