public function onKernelTerminate()
 {
     $requestTime = $this->getExecutionTime();
     $queryTime = $this->queryExecution->getTotalTime();
     $queryCount = $this->queryExecution->getCount();
     $memory = $this->getMemoryUsage();
     $this->logger->notice(sprintf('Resources: request time = %sms; query time = %sms;' . ' query count = %s; memory = %sMB', $requestTime, $queryTime, $queryCount, $memory), ['metadata' => ['request_time' => $requestTime, 'request_time_unit' => 'ms', 'query_total_time' => $queryTime, 'query_total_time_unit' => 'ms', 'query_count' => $queryCount, 'memory_usage' => $memory, 'memory_usage_unit' => 'MB'], 'description' => 'resource']);
 }
 /**
  * {@inheritdoc}
  */
 public function stopQuery()
 {
     $queryTime = $this->getQueryTime();
     if ($this->queryExecution) {
         $this->queryExecution->recordTime($queryTime);
         $this->queryExecution->incrementCounter();
     }
     $query = $this->queries[$this->currentQuery];
     $this->log(sprintf('%s', $query['sql']), ['metadata' => ['time' => $queryTime, 'time_unit' => 'ms', 'params' => is_array($query['params']) ? $query['params'] : []], 'description' => 'query']);
 }