r82886 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82885‎ | r82886 | r82887 >
Date:09:34, 27 February 2011
Author:aaron
Status:deferred
Tags:
Comment:
Added p90 stat since it's interesting
Modified paths:
  • /trunk/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -245,11 +245,10 @@
246246 $rank = round( count($times)/2 + .5 ) - 1;
247247 $medianRT = $times[$rank];
248248 // Make percentile tabulation data
249 - $percentile = 35; // start at 35th
250 - while ( $percentile < 100 ) {
 249+ $doPercentiles = array( 35, 45, 55, 65, 75, 85, 90, 95 );
 250+ foreach ( $doPercentiles as $percentile ) {
251251 $rank = round( $percentile*count($times)/100 + .5 ) - 1;
252252 $rPerTable[$percentile] = $times[$rank];
253 - $percentile += 10;
254253 }
255254 echo "(sampled ".count($times)." edits)...";
256255 }

Status & tagging log