From: Tim Starling Date: Mon, 3 Jul 2006 16:41:07 +0000 (+0000) Subject: Log job execution time X-Git-Tag: 1.31.0-rc.0~56433 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=242f024d1be97decc30f37da9326ae896f11bf35;p=lhc%2Fweb%2Fwiklou.git Log job execution time --- diff --git a/includes/Wiki.php b/includes/Wiki.php index b50f510154..4c4a8314b4 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -285,8 +285,14 @@ class MediaWiki { while ( $n-- && false != ($job = Job::pop())) { $output = $job->toString() . "\n"; - if ( !$job->run() ) { - $output .= "Error: " . $job->getLastError() . "\n"; + $t = -wfTime(); + $success = $job->run(); + $t += wfTime(); + $t = round( $t*1000 ); + if ( !$success ) { + $output .= "Error: " . $job->getLastError() . ", Time: $t ms\n"; + } else { + $output .= "Success, Time: $t ms\n"; } if ( $wgJobLogFile ) { error_log( $output, 3, $wgJobLogFile );