[tor-commits] [metrics-web/master] Make userstats graphs respect start and end params.

karsten at torproject.org karsten at torproject.org
Fri May 10 07:27:39 UTC 2013


commit fde2678d37bf4a8820ab068a069d2cce1feedf5a
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Fri May 10 09:27:14 2013 +0200

    Make userstats graphs respect start and end params.
---
 rserve/graphs.R |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rserve/graphs.R b/rserve/graphs.R
index b1ffd86..89edff5 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -1027,6 +1027,7 @@ plot_userstats <- function(start, end, node, variable, value, path) {
   u <- read.csv(paste("/srv/metrics.torproject.org/task-8462-graphs/",
     "task-8462/userstats.csv", sep = ""),
     stringsAsFactors = FALSE)
+  u <- u[u$date >= start & u$date <= end, ]
   if (node == 'relay') {
     if (value != 'all') {
       u <- u[u$country == value & u$node == 'relay', ]



More information about the tor-commits mailing list