diff --git a/src/Http/Middleware/ServerTimingMiddleware.php b/src/Http/Middleware/ServerTimingMiddleware.php index 1694379..e145750 100644 --- a/src/Http/Middleware/ServerTimingMiddleware.php +++ b/src/Http/Middleware/ServerTimingMiddleware.php @@ -4,7 +4,6 @@ use Closure; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Log; use Illuminate\Support\Str; use Matchory\ServerTiming\ServerTiming; use Symfony\Component\HttpFoundation\Response; @@ -33,17 +32,6 @@ public function handle(Request $request, Closure $next): Response } $this->timing->setDuration('Bootstrap', $this->getElapsedTime()); - if ( ! $this->isOctane()) { - Log::error('Not Octane - adding bootstrap time', [ - 'LARAVEL_OCTANE' => $_SERVER['LARAVEL_OCTANE'] ?? null, - ]); - } else { - Log::error('Inside Octane - omitting bootstrap time', [ - 'LARAVEL_OCTANE' => $_SERVER['LARAVEL_OCTANE'] ?? null, - ]); - - } - $this->timing->start('App'); $response = $next($request); @@ -52,10 +40,7 @@ public function handle(Request $request, Closure $next): Response $this->timing->stopAllUnfinishedEvents(); $total = array_sum($this->timing->events()); - # $this->timing->setDuration('Total', $total); - -# if ( ! $this->isOctane()) { -# } + $this->timing->setDuration('Total', $total); $response->headers->set(self::HEADER, $this->generateHeaders()); @@ -87,9 +72,4 @@ protected function getElapsedTime(): float { return (microtime(true) - $this->timing->getStart()) * 1000; } - - private function isOctane(): bool - { - return (bool)($_SERVER['LARAVEL_OCTANE'] ?? false); - } }