Don't care about this statistic on php-cli when unit tests run.

This commit is contained in:
Greyscale 2022-06-19 04:11:02 +02:00
parent 2876dcab12
commit 9ee17e3a8d
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2

View file

@ -574,7 +574,7 @@ class App
$timeToBootstrapMs = (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000;
$bootstrapTooLongThresholdMs = 300;
if ($timeToBootstrapMs >= $bootstrapTooLongThresholdMs) {
if ($timeToBootstrapMs >= $bootstrapTooLongThresholdMs && php_sapi_name() != 'cli') {
$this->logger->warning(sprintf('Bootstrap complete in %sms which is more than the threshold of %sms', number_format($timeToBootstrapMs, 2), $bootstrapTooLongThresholdMs));
}