예제 #1
0
 /**
  * @param ConsoleTerminateEvent $event
  */
 public function onTerminate(ConsoleTerminateEvent $event)
 {
     $this->client->send();
 }
예제 #2
0
 /**
  * @param PostResponseEvent $event
  */
 protected function collectData(PostResponseEvent $event)
 {
     $request = $event->getRequest();
     $this->client->add('app.profiler', ['memory' => $this->getMemoryPeak(), 'execution_time' => $this->getExecutionTime($event)], ['method' => $request->server->get('REQUEST_METHOD'), 'client_ip' => $request->server->get('REMOTE_ADDR'), 'https' => $request->server->get('HTTPS'), 'uri' => $request->server->get('DOCUMENT_URI'), 'host' => $request->server->get('HTTP_HOST')]);
 }