From: Robin Appelman Date: Mon, 16 May 2022 11:25:45 +0000 (+0200) Subject: reorder startup events to fix overlapping X-Git-Tag: v25.0.0beta1~396^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a67bf03ac09feb52a787faec2287d7e27cb929fc;p=nextcloud-server.git reorder startup events to fix overlapping current the `request` and `runtime` events overlap with the `init` event which makes it hard to create usefull visualizations. this reorders things a bit to remove an overlap Signed-off-by: Robin Appelman --- diff --git a/lib/base.php b/lib/base.php index 8cf5360b084..bb85bda5acc 100644 --- a/lib/base.php +++ b/lib/base.php @@ -595,12 +595,7 @@ class OC { $eventLogger = \OC::$server->getEventLogger(); $eventLogger->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd); - $eventLogger->start('request', 'Full request after autoloading'); - register_shutdown_function(function () use ($eventLogger) { - $eventLogger->end('request'); - }); $eventLogger->start('boot', 'Initialize'); - $eventLogger->start('runtime', 'Runtime (total - autoloader)'); // Override php.ini and log everything if we're troubleshooting if (self::$config->getValue('loglevel') === ILogger::DEBUG) { @@ -797,6 +792,11 @@ class OC { } $eventLogger->end('boot'); $eventLogger->log('init', 'OC::init', $loaderStart, microtime(true)); + $eventLogger->start('runtime', 'Runtime'); + $eventLogger->start('request', 'Full request after boot'); + register_shutdown_function(function () use ($eventLogger) { + $eventLogger->end('request'); + }); } /**