[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-tasks/master] Add a graph with relative probabilities (#1854).



commit bd4e73627eebfe7332e125c772b368c86cd07ce8
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Nov 27 12:44:17 2012 -0500

    Add a graph with relative probabilities (#1854).
---
 task-1854/plot-entropy.R |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/task-1854/plot-entropy.R b/task-1854/plot-entropy.R
index cc963e4..ac02782 100644
--- a/task-1854/plot-entropy.R
+++ b/task-1854/plot-entropy.R
@@ -45,6 +45,19 @@ scale_colour_hue(name = "Advertised bandwidth cutoff in B/s") +
 opts(title = paste("Consensus with valid-after time", max(p$validafter)),
   legend.position = "top")
 
+c <- p[p$advbw >= 1048576, ]
+c <- data.frame(advbw = c$advbw, prob = c$prob,
+  minadvbw = paste("c", c$minadvbw, sep = ""))
+c <- cast(c, advbw ~ minadvbw, value = "prob")
+c <- data.frame(advbw = c$advbw, rel = c$c1048576 / c$c20480)
+ggplot(c, aes(x = advbw, y = rel)) +
+geom_point(alpha = 0.25) +
+scale_x_log10(name = "\nAdvertised bandwidth in B/s (log scale)") +
+scale_y_continuous(name = paste("Ratio of probaility at 1 MiB/s cutoff",
+  "to probability at 20 KiB/s cutoff\n")) +
+opts(title = paste("Consensus with valid-after time ", max(p$validafter),
+  "\n", sep = ""), legend.position = "top")
+
 e <- read.csv("linf-extracted.csv", header = FALSE,
   col.names = c("validafter", "min_adv_bw", "relays", "linf",
   "excl_adv_bw", "graph"), stringsAsFactor = FALSE)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits