Skip to content

Commit 0e8d3fb

Browse files
authored
Remove bootstrap time and total time for octance requests
1 parent 9a61d19 commit 0e8d3fb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Middleware/ServerTimingMiddleware.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public function handle(Request $request, Closure $next): Response
2727
return $next($request);
2828
}
2929

30-
$this->timing->setDuration('Bootstrap', $this->getElapsedTimeInMs());
30+
if (!isset($_SERVER['LARAVEL_OCTANE'])) {
31+
$this->timing->setDuration('Bootstrap', $this->getElapsedTimeInMs());
32+
}
3133

3234
$this->timing->start('App');
3335

@@ -38,7 +40,9 @@ public function handle(Request $request, Closure $next): Response
3840

3941
$this->timing->stopAllUnfinishedEvents();
4042

41-
$this->timing->setDuration('Total', $this->getElapsedTimeInMs());
43+
if (!isset($_SERVER['LARAVEL_OCTANE'])) {
44+
$this->timing->setDuration('Total', $this->getElapsedTimeInMs());
45+
}
4246

4347
$response->headers->set('Server-Timing', $this->generateHeaders());
4448

0 commit comments

Comments
 (0)