Skip to content

Commit 4667be1

Browse files
committed
feat: add some extra debug timing
1 parent a724e54 commit 4667be1

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/Application/LaravelApplication.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function initialize(): void
6464

6565
$this->createStorageDirectories();
6666

67-
$logger->debug('Creating Laravel cache');
67+
$cacheStart = microtime(true);
6868

6969
$process = new Process(['/opt/bin/php', $this->context->getRootDirectory().'/artisan', 'config:cache', '--no-ansi']);
7070
$process->run();
@@ -73,6 +73,6 @@ public function initialize(): void
7373
throw new ApplicationInitializationException(sprintf('Failed to create Laravel cache: %s', $process->getErrorOutput()));
7474
}
7575

76-
$logger->debug('Laravel cache created');
76+
$logger->debug(sprintf('Laravel cache created in %dms', (microtime(true) - $cacheStart) * 1000));
7777
}
7878
}

src/FastCgi/PhpFpmProcess.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public function handle(ProvidesRequestData $request, int $timeoutMs): ProvidesRe
125125
*/
126126
public function start(): void
127127
{
128+
$start = microtime(true);
128129
$socketDirectory = dirname(self::SOCKET_PATH);
129130

130131
if (!is_dir($socketDirectory)) {
@@ -145,6 +146,8 @@ public function start(): void
145146

146147
return !$this->isStarted();
147148
}, 5000000);
149+
150+
$this->logger->info(sprintf('PHP-FPM process started in %dms', (microtime(true) - $start) * 1000));
148151
}
149152

150153
/**

0 commit comments

Comments
 (0)