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

[or-cvs] [ernie/master 3/3] Add graphs on versions, platforms, and advertised bandwidth.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue, 9 Mar 2010 15:09:52 +0100
Subject: Add graphs on versions, platforms, and advertised bandwidth.
Commit: 1a2a306aa4847e193e4909a180a51e308608b951

---
 R/descriptor-stats.R |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++
 R/graphs.R           |    1 +
 website/graphs.html  |   30 +++++++++++++++++++++++++
 3 files changed, 91 insertions(+), 0 deletions(-)
 create mode 100644 R/descriptor-stats.R

diff --git a/R/descriptor-stats.R b/R/descriptor-stats.R
new file mode 100644
index 0000000..1ff5f47
--- /dev/null
+++ b/R/descriptor-stats.R
@@ -0,0 +1,60 @@
+options(warn = -1)
+suppressPackageStartupMessages(library("ggplot2"))
+
+versions <- read.csv("stats/version-stats", header = TRUE,
+    colClasses = c(date = "Date"))
+platforms <- read.csv("stats/platform-stats", header = TRUE,
+    colClasses = c(date = "Date"))
+bandwidth <- read.csv("stats/bandwidth-stats", header = TRUE,
+    colClasses = c(date = "Date"))
+write.csv(versions, "website/csv/versions.csv", quote = FALSE,
+  row.names = FALSE)
+write.csv(platforms, "website/csv/platforms.csv", quote = FALSE,
+  row.names = FALSE)
+write.csv(bandwidth, "website/csv/bandwidth.csv", quote = FALSE,
+  row.names = FALSE)
+
+plot_versions <- function() {
+  v <- melt(versions, id = "date")
+  ggplot(v, aes(x = date, y = value, colour = variable)) +
+    geom_line(size = 1) +
+    scale_x_date(name = "") + scale_y_continuous(name = "",
+        limits = c(0, max(v$value, na.rm = TRUE))) +
+    scale_colour_brewer(name = "Tor version",
+        breaks = rev(names(versions)[2:length(names(versions))]),
+        labels = c("other",
+            substr(rev(names(versions)[2:(length(names(versions)) - 1)]),
+            2, 6))) +
+    opts(title = "Relay versions\n")
+  ggsave(filename = "website/graphs/descriptors/versions.png",
+    width = 8, height = 5, dpi = 72)
+}
+
+plot_platforms <- function() {
+  p <- melt(platforms, id = "date")
+  ggplot(p, aes(x = date, y = value, colour = variable)) +
+    geom_line(size = 1) +
+    scale_x_date(name = "") + scale_y_continuous(name = "",
+        limits = c(0, max(p$value, na.rm = TRUE))) +
+    scale_colour_brewer(name = "Platform",
+        breaks = rev(names(platforms)[2:length(names(platforms))]),
+        labels = rev(names(platforms)[2:length(names(platforms))])) +
+    opts(title = "Relay platforms\n")
+  ggsave(filename = "website/graphs/descriptors/platforms.png",
+    width = 8, height = 5, dpi = 72)
+}
+
+plot_bandwidth <- function() {
+  ggplot(bandwidth, aes(x = date, y = advbw / 1024)) + geom_line() +
+    scale_x_date(name = "") +
+    scale_y_continuous(name = "Bandwidth (MiB/s)",
+        limits = c(0, max(bandwidth$advbw / 1024, na.rm = TRUE))) +
+    opts(title = "Total advertised bandwidth\n")
+  ggsave(filename = "website/graphs/descriptors/bandwidth.png",
+    width = 8, height = 5, dpi = 72)
+}
+
+plot_versions()
+plot_platforms()
+plot_bandwidth()
+
diff --git a/R/graphs.R b/R/graphs.R
index 1fc819b..b6114d7 100644
--- a/R/graphs.R
+++ b/R/graphs.R
@@ -1,6 +1,7 @@
 source("R/consensus-stats.R");
 source("R/dirreq-stats.R");
 source("R/bridge-stats.R");
+source("R/descriptor-stats.R");
 source("R/torperf.R");
 source("R/gettor.R");
 
diff --git a/website/graphs.html b/website/graphs.html
index 7106fc6..ec6f7c4 100644
--- a/website/graphs.html
+++ b/website/graphs.html
@@ -39,6 +39,9 @@
           <li><a href="#bridgeusers">Tor users via bridges</a></li>
           <li><a href="#torperf">Time to complete requests</a></li>
           <li><a href="#gettor">Packages delivered by GetTor</a></li>
+          <li><a href="#versions">Relay versions</a></li>
+          <li><a href="#platforms">Relay platforms</a></li>
+          <li><a href="#bandwidth">Relay bandwidth</a></li>
         </ul>
         <br/>
         <a id="relays"/>
@@ -108,6 +111,33 @@
         <p>More graphs about specific packages can be found on a 
         <a href="gettor-graphs.html">separate page</a>.</p>
         <br/>
+        <a id="versions"/>
+        <h3>Relay versions</h3>
+        <br/>
+        <p>Relays report the Tor version that they are running in their
+        server descriptors that they send to the directory authorities.
+        The following graph shows the number of relays running specific
+        Tor versions.</p>
+        <img src="graphs/descriptors/versions.png"/>
+        <br/>
+        <a id="platforms"/>
+        <h3>Relay platforms</h3>
+        <br/>
+        <p>Relays further report the operating systems in their server
+        descriptors that they send to the directory authorities. The
+        following graph shows the number of relays running specific
+        platforms.</p>
+        <img src="graphs/descriptors/platforms.png"/>
+        <br/>
+        <a id="bandwidth"/>
+        <h3>Relay bandwidth</h3>
+        <br/>
+        <p>Relays advertise how much bandwidth they are willing and
+        to contribute in their server descriptors. The following graph
+        shows the sum of advertised bandwidth of all relays in the
+        network.</p>
+        <img src="graphs/descriptors/bandwidth.png"/>
+        <br/>
       </div>
     </div>
     <div class="bottom" id="bottom">
-- 
1.6.5