From a67bf03ac09feb52a787faec2287d7e27cb929fc Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 16 May 2022 13:25:45 +0200 Subject: [PATCH] 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 --- lib/base.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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'); + }); } /** -- 2.39.5