[tor-commits] [metrics-tasks/master] Make more tweaks for asn (#15513).

karsten at torproject.org karsten at torproject.org
Tue Jul 14 16:12:43 UTC 2015


commit 2e5278add61496bf001e74adb906a9335927997c
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Jul 14 18:12:20 2015 +0200

    Make more tweaks for asn (#15513).
---
 task-15513/plot.R |   53 +++++++++++++++++++++++++++++++++--------------------
 1 file changed, 33 insertions(+), 20 deletions(-)

diff --git a/task-15513/plot.R b/task-15513/plot.R
index 078c791..24bce64 100644
--- a/task-15513/plot.R
+++ b/task-15513/plot.R
@@ -8,8 +8,9 @@ ggplot(l, aes(x = lifetime_millis / 3600000, colour = service)) +
   scale_x_continuous("\nLifetime in hours",
     limits = c(0, max(l$lifetime_millis) / 3600000)) +
   scale_y_continuous("Cumulative fraction\n", labels = percent) +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle("(a) Lifetime of introduction points\n")
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle("Lifetime of introduction points\n")
+ggsave("lifetimes-2015-07-14-a.png", width = 8, height = 5, dpi = 100)
 
 l <- read.csv("published-descs.csv")
 ggplot(l, aes(x = descs, colour = service)) +
@@ -17,9 +18,10 @@ ggplot(l, aes(x = descs, colour = service)) +
   scale_x_continuous("\nNumber of descriptors",
     limits = c(0, max(l$descs))) +
   scale_y_continuous("Cumulative fraction\n", labels = percent) +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle(paste("(b) Number of descriptors published per hour,\n",
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle(paste("Number of descriptors published per hour,\n",
     "including descriptor replicas\n", sep = ""))
+ggsave("lifetimes-2015-07-14-b.png", width = 8, height = 5, dpi = 100)
 
 l <- read.csv("established-intros.csv")
 ggplot(l, aes(x = intros, colour = service)) +
@@ -27,8 +29,9 @@ ggplot(l, aes(x = intros, colour = service)) +
   scale_x_continuous("\nNumber of introduction points",
     limits = c(0, max(l$intros))) +
   scale_y_continuous("Cumulative fraction\n", labels = percent) +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle("(c) Number of distinct introduction points used per hour\n")
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle("Number of distinct introduction points used per hour\n")
+ggsave("lifetimes-2015-07-14-c.png", width = 8, height = 5, dpi = 100)
 
 l <- read.csv("intros-per-desc.csv")
 ggplot(l, aes(x = introsperdesc, colour = service)) +
@@ -37,8 +40,9 @@ ggplot(l, aes(x = introsperdesc, colour = service)) +
     limits = c(0, max(l$introsperdesc)),
     breaks = seq(0, max(l$introsperdesc), 2)) +
   scale_y_continuous("Cumulative fraction\n", labels = percent) +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle("(d) Number of introduction points per descriptor\n")
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle("Number of introduction points per descriptor\n")
+ggsave("lifetimes-2015-07-14-d.png", width = 8, height = 5, dpi = 100)
 
 l <- read.csv("intros-per-relay.csv")
 data <- rbind(
@@ -64,9 +68,10 @@ ggplot(data) +
     limits = c(0, max(data$x))) +
   scale_y_continuous(paste("Cumulative number of relays used for",
     "introduction points\n")) +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle(paste("(e) Number of introduction points established on\nthe",
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle(paste("Number of introduction points established on\nthe",
     "same relay (in the measurement period)\n"))
+ggsave("lifetimes-2015-07-14-e.png", width = 8, height = 5, dpi = 100)
 
 data <- data[as.character(data$colour) != "agorahooawayyfoe", ]
 ggplot(data) +
@@ -75,24 +80,31 @@ ggplot(data) +
     limits = c(0, max(data$x, na.rm = TRUE))) +
   scale_y_continuous(paste("Cumulative number of relays used for",
     "introduction points\n")) +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle(paste("(f) Number of introduction points established on\nthe",
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle(paste("Number of introduction points established on\nthe",
     "same relay (in the measurement period)\n"))
+ggsave("lifetimes-2015-07-14-f.png", width = 8, height = 5, dpi = 100)
 
 l <- read.csv("intros-per-desc.csv")
+l <- data.frame(l,
+  scrubbed = ifelse(l$service == "4cjw6cwpeaeppfqz", "a",
+             ifelse(l$service == "agorahooawayyfoe", "b",
+             ifelse(l$service == "facebookcorewwwi", "c",
+             ifelse(l$service == "kpvz7kpmcmne52qf", "d",
+             ifelse(l$service == "msydqstlz2kzerdg", "e",
+             "f"))))))
 l <- aggregate(list(introsperdesc = l$introsperdesc), by = list(
   publication = (l$publication %/% (1 * 3600 * 1000)) * (1 * 3600),
-  service = l$service), FUN = max)
+  scrubbed = l$scrubbed), FUN = max)
 ggplot(l, aes(x = as.POSIXct(publication,
-    origin = "1970-01-01 00:00:00"), y = introsperdesc, fill = service)) +
+    origin = "1970-01-01 00:00:00"), y = introsperdesc, fill = scrubbed)) +
   geom_area() +
   scale_fill_hue("", guide = "none") +
-  facet_grid(service ~ .) +
+  facet_grid(scrubbed ~ .) +
   scale_x_datetime("") +
   scale_y_continuous("") +
-  ggtitle("(g) Number of introduction points over time\n") +
-  theme(strip.background = element_blank(),
-    strip.text.y = element_blank())
+  ggtitle("Number of introduction points over time\n")
+ggsave("lifetimes-2015-07-14-g.png", width = 8, height = 5, dpi = 100)
 
 l <- read.csv("novel-introduction-points.csv")
 ggplot(l, aes(
@@ -101,7 +113,8 @@ ggplot(l, aes(
   geom_line() +
   scale_x_datetime("") +
   scale_y_continuous("Cumulative number of relays\n") +
-  scale_colour_hue("Service", guide = FALSE) +
-  ggtitle(paste("(h) Cumulative number of distinct relays\nused for",
+  scale_colour_hue("Service", labels = c("a", "b", "c", "d", "e", "f")) +
+  ggtitle(paste("Cumulative number of distinct relays\nused for",
                 "establishing introduction points\n"))
+ggsave("lifetimes-2015-07-14-h.png", width = 8, height = 5, dpi = 100)
 



More information about the tor-commits mailing list