Change-Id: Id17e116cd58d433bf6bb51c38096727a660135b9
$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;
}