OliverKeyes has submitted this change and it was merged.

Change subject: Remove '?loadtesting' from maps stats
......................................................................


Remove '?loadtesting' from maps stats

Maps load testing is done with an extra query parameter.
We should remove it from analyzing to keep the data more accurate.

Please re-generate data for November

Relates to Change-Id: Ifdd10e661bdb900b5c41f568a491ac3266639590

Change-Id: I45ff0c716335d07f1628af6b98f21184988da5a7
---
M maps/tiles.R
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  OliverKeyes: Verified; Looks good to me, approved



diff --git a/maps/tiles.R b/maps/tiles.R
index 262afa6..b64fbc9 100644
--- a/maps/tiles.R
+++ b/maps/tiles.R
@@ -8,7 +8,7 @@
 # - tile requests per style per zoom, e.g. "osm-z10", "osm-z11", ...
 
 main <- function(date = NULL) {
-  
+
   # Date handling
   if(is.null(date)) {
     date <- Sys.Date() - 1
@@ -29,6 +29,7 @@
                        AND webrequest_source = 'maps'
                        AND http_status IN('200','304')
                        AND uri_path RLIKE 
'^/([^/]+)/([0-9]{1,2})/(-?[0-9]+)/(-?[0-9]+)(@([0-9]\\.?[0-9]?)x)?\\.([a-z]+)$'
+                       AND uri_query <> '?loadtesting'
                    ) prepared
                    GROUP BY style, zoom, scale, format, user_id, cache;")
   results <- query_hive(query)
@@ -50,12 +51,12 @@
           percentile95 = ceiling(quantile(x$n, 0.95)),
           percentile99 = ceiling(quantile(x$n, 0.99)))
   })
-  
+
   # Clean up those results:
   results <- results[order(results$style, results$zoom, results$scale, 
results$format, results$cache), ]
   results$date <- date
   output <- results[, union('date', names(results))]
-  
+
   # Write out
   conditional_write(output, file.path(base_path, "tile_aggregates.tsv"))
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45ff0c716335d07f1628af6b98f21184988da5a7
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: Bearloga <[email protected]>
Gerrit-Reviewer: OliverKeyes <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>

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

Reply via email to