]> source.dussan.org Git - nextcloud-server.git/commitdiff
reorder startup events to fix overlapping 32427/head
authorRobin Appelman <robin@icewind.nl>
Mon, 16 May 2022 11:25:45 +0000 (13:25 +0200)
committerRobin Appelman <robin@icewind.nl>
Mon, 16 May 2022 11:26:38 +0000 (13:26 +0200)
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 <robin@icewind.nl>
lib/base.php

index 8cf5360b084c29b0d4c41253190f5350e44cf448..bb85bda5accb0386f980f09c41d81879c166402b 100644 (file)
@@ -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');
+               });
        }
 
        /**