Log slow diffs
Change-Id: Id17e116cd58d433bf6bb51c38096727a660135b9
This commit is contained in:
parent
2d3a3cc1d8
commit
7b18a62c0e
1 changed files with 7 additions and 2 deletions
|
|
@ -846,8 +846,13 @@ class DifferenceEngine extends ContextSource {
|
|||
|
||||
$result = $this->textDiff( $otext, $ntext );
|
||||
|
||||
$time = microtime( true ) - $time;
|
||||
$this->getStats()->timing( 'diff_time', $time * 1000 );
|
||||
$time = intval( ( microtime( true ) - $time ) * 1000 );
|
||||
$this->getStats()->timing( 'diff_time', $time );
|
||||
// Log requests slower than 99th percentile
|
||||
if ( $time > 100 && $this->mOldPage && $this->mNewPage ) {
|
||||
wfDebugLog( 'diff',
|
||||
"$time ms diff: {$this->mOldid} -> {$this->mNewid} {$this->mNewPage}" );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue