From: mayankmadan Date: Sun, 3 Nov 2013 14:47:02 +0000 (+0530) Subject: Add ability to show the time taken by update.php X-Git-Tag: 1.31.0-rc.0~18034^2~2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=fae8daa658c1;p=lhc%2Fweb%2Fwiklou.git Add ability to show the time taken by update.php Bug: 28278 Change-Id: I42cd0da35a2ed20748374afbe1a02773cd941136 --- 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() {