Move timing code out of the try/catch in doPostOutputShutdown()
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 25 Oct 2018 16:22:30 +0000 (09:22 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 25 Oct 2018 16:22:30 +0000 (09:22 -0700)
Change-Id: Idc24fdaff5bbcb98445cc4dee8c94cc75cd00573

includes/MediaWiki.php

index 12b6638..00caca9 100644 (file)
@@ -704,11 +704,12 @@ class MediaWiki {
         * @since 1.26
         */
        public function doPostOutputShutdown( $mode = 'normal' ) {
+               // Record backend request timing
+               $timing = $this->context->getTiming();
+               $timing->mark( 'requestShutdown' );
+
                // Perform the last synchronous operations...
                try {
-                       // Record backend request timing
-                       $timing = $this->context->getTiming();
-                       $timing->mark( 'requestShutdown' );
                        // Show visible profiling data if enabled (which cannot be post-send)
                        Profiler::instance()->logDataPageOutputOnly();
                } catch ( Exception $e ) {