public function call() { $app = $this->app; $this->next->call(); $res = $app->response; $time_end = microtime(true); $time = $time_end - $GLOBALS['EMA']['start_time']; $res->headers->set('X-EMA-Memory', UploadedFileManager::formatSizeUnits(memory_get_peak_usage(true))); $res->headers->set('X-EMA-Time', $time); }