From fae8daa658c144b2414366a2bd93e7766d94d687 Mon Sep 17 00:00:00 2001 From: mayankmadan Date: Sun, 3 Nov 2013 20:17:02 +0530 Subject: [PATCH] Add ability to show the time taken by update.php Bug: 28278 Change-Id: I42cd0da35a2ed20748374afbe1a02773cd941136 --- maintenance/update.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintenance/update.php b/maintenance/update.php index 378217fd0b..5c93964ef4 100644 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -132,6 +132,8 @@ class UpdateMediaWiki extends Maintenance { wfCountDown( 5 ); } + $time1 = new MWTimestamp(); + $shared = $this->hasOption( 'doshared' ); $updates = array( 'core', 'extensions' ); @@ -164,8 +166,10 @@ class UpdateMediaWiki extends Maintenance { if ( !$this->hasOption( 'nopurge' ) ) { $updater->purgeCache(); } + $time2 = new MWTimestamp(); $this->output( "\nDone.\n" ); + $this->output( "\nThe job took ". $time2->diff( $time1 )->format( "%i:%S" ). "\n" ); } function afterFinalSetup() { -- 2.20.1