[tor-commits] [metrics-web/master] Handle duplicate values in almost-fast exits graph.
karsten at torproject.org
karsten at torproject.org
Mon Nov 12 15:00:37 UTC 2012
commit 8054411cdd0c1fc01136cb0ecfbd6c7014cdc2bb
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Mon Nov 12 09:58:43 2012 -0500
Handle duplicate values in almost-fast exits graph.
These duplicate values came from running the graph data generating
script more than once per hour which confused the R script.
Fixes #7452.
---
rserve/graphs.R | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/rserve/graphs.R b/rserve/graphs.R
index 4e61a8d..07de07f 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -958,10 +958,11 @@ plot_almost_fast_exits <- function(start, end, path) {
t$min_advbw == 2000 & t$same_network == FALSE, ]
t <- rbind(data.frame(t1, var = "fast"),
data.frame(t2, var = "almost_fast"))
- r <- cast(t, valid_after ~ var, value = "relays")
+ r <- cast(t, valid_after ~ var, value = "relays", fun.aggregate = max)
r <- data.frame(valid_after = r$valid_after, fast = r$fast,
almost = r$almost_fast - r$fast, var = "relays")
- e <- cast(t, valid_after ~ var, value = "exit_prob")
+ e <- cast(t, valid_after ~ var, value = "exit_prob",
+ fun.aggregate = max)
e <- data.frame(valid_after = e$valid_after, fast = 100 * e$fast,
almost = 100 * (e$almost_fast - e$fast), var = "exit_prob")
t <- rbind(r, e)
More information about the tor-commits
mailing list