[tor-commits] [metrics-tasks/master] Add graphing code for #4686.

karsten at torproject.org karsten at torproject.org
Mon Jan 16 11:02:59 UTC 2012


commit 7469525be32159d6ca783f5e5c7e8af2c0856588
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Mon Jan 16 11:55:07 2012 +0100

    Add graphing code for #4686.
---
 task-4686/.gitignore       |    4 ++++
 task-4686/download-stats.R |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/task-4686/.gitignore b/task-4686/.gitignore
new file mode 100644
index 0000000..23b548f
--- /dev/null
+++ b/task-4686/.gitignore
@@ -0,0 +1,4 @@
+Rplots.pdf
+download-stats.csv
+download-stats.png
+
diff --git a/task-4686/download-stats.R b/task-4686/download-stats.R
new file mode 100644
index 0000000..bdc599c
--- /dev/null
+++ b/task-4686/download-stats.R
@@ -0,0 +1,13 @@
+library(ggplot2)
+d <- read.csv("download-stats.csv", header = FALSE,
+  col.names = c("dirauth", "download", "seconds"))
+ggplot(d, aes(x = as.POSIXct(download / 1000,
+  origin = "1970-01-01 00:00:00"), y = seconds / 1000)) +
+geom_point(alpha = 0.25) +
+facet_wrap(~ dirauth) +
+scale_x_datetime(name = "", major = "1 month", minor = "1 week",
+  format = "%b %d, %Y") +
+scale_y_continuous(name = "", limits = c(0, max(d$seconds) / 1000)) +
+opts(title = "Consensus download times in seconds\n")
+ggsave("download-stats.png", width = 8, height = 6, dpi = 100)
+



More information about the tor-commits mailing list