Erik Zachte has submitted this change and it was merged.

Change subject: ignore two days of incomplete data (and extrapolate from rest)
......................................................................


ignore two days of incomplete data (and extrapolate from rest)

Change-Id: I4dcede2a17f0ee6536bc8ba0d29c97ee36b37e14
---
M analytics/perl/AnalyticsPrepWikiCountsOutputCore.pl
1 file changed, 7 insertions(+), 5 deletions(-)

Approvals:
  Erik Zachte: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/analytics/perl/AnalyticsPrepWikiCountsOutputCore.pl 
b/analytics/perl/AnalyticsPrepWikiCountsOutputCore.pl
index c82c417..d6ad755 100644
--- a/analytics/perl/AnalyticsPrepWikiCountsOutputCore.pl
+++ b/analytics/perl/AnalyticsPrepWikiCountsOutputCore.pl
@@ -25,6 +25,8 @@
   $all_projects = '*' ;
 
   $maxpopularwikis = 25 ;
+  $maxextensions   = 14 ; # Q&D actually prints 15 (starts with 0)
+
   @projects = ('wb','wk','wn','wo','wp','wq','ws','wv','wx','commons','*') ;
 
   &LogArguments ;
@@ -374,7 +376,7 @@
   {
     # print "$extndx < ${ext_cnt {-1}{$extndx}} > : ${ext_cnt_mmax 
{$extndx}}\n" ;
     push @extndxs, $extndx ;
-    if ($extcnt++ >= 9) { last ; }
+    if ($extcnt++ >= $maxextensions) { last ; }
   }
 }
 
@@ -649,8 +651,8 @@
   $output .= "$line\n" ;
 
   $index = 0 ;
-  # feed the 10 extensions with most pages, largest one last (comes on top in 
Excel chart)
-  for ($e = $#extndxs - 9 ; $e <= $#extndxs ; $e++)
+  # feed the extensions with most pages, largest one last (comes on top in 
Excel chart)
+  for ($e = $#extndxs - $maxextensions ; $e <= $#extndxs ; $e++)
   {
     $index++ ;
 
@@ -689,8 +691,8 @@
   $output .= "$csv_recent_months\n" ;
 
   $index = 0 ;
-  # feed the 10 extensions with most pages, largest one last (comes on top in 
Excel chart)
-  for ($e = $#extndxs - 9 ; $e <= $#extndxs ; $e++)
+  # feed the extensions with most pages, largest one last (comes on top in 
Excel chart)
+  for ($e = $#extndxs - $maxextensions ; $e <= $#extndxs ; $e++)
   {
     $index++ ;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/75610
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dcede2a17f0ee6536bc8ba0d29c97ee36b37e14
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats
Gerrit-Branch: master
Gerrit-Owner: Erik Zachte <[email protected]>
Gerrit-Reviewer: Erik Zachte <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to