X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=blobdiff_plain;f=includes%2Fdiff%2FDifferenceEngine.php;h=f2630d935d8b74ddc46de8616cd502acc95e00ee;hb=7b18a62c0efbb7541abf1bc8d459bf6c3cf02775;hp=1cf3918a45dc941e22da44edc0327304805d7031;hpb=5c6a0cf57d98ed517b9470ba21e5b9e6141e0ea8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 1cf3918a45..f2630d935d 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -846,8 +846,13 @@ class DifferenceEngine extends ContextSource { $result = $this->textDiff( $otext, $ntext ); - $time = microtime( true ) - $time; + $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; }