[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [ernie/master] Add graph on running relays and exits for past 72 hours.
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu, 11 Mar 2010 11:29:47 +0100
Subject: Add graph on running relays and exits for past 72 hours.
Commit: 4c0bb1e0c370c9fe539ab62f89ae8f161ce287bf
---
R/consensus-stats.R | 13 +++++++++++++
website/consensus-graphs.html | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/R/consensus-stats.R b/R/consensus-stats.R
index d10fcff..e7a8ab9 100644
--- a/R/consensus-stats.R
+++ b/R/consensus-stats.R
@@ -1,6 +1,19 @@
options(warn = -1)
suppressPackageStartupMessages(library("ggplot2"))
+relaysDay <- read.csv("stats/consensus-stats-raw", stringsAsFactors = FALSE)
+from <- seq(from = max(as.POSIXct(relaysDay$datetime, tz = "GMT")), length = 2, by = "-3 days")[2]
+relaysDay <- subset(relaysDay, as.POSIXct(datetime, tz = "GMT") >= from)
+m <- melt(relaysDay[,c(1, 2, 5)], id = "datetime")
+ggplot(m, aes(x = as.POSIXct(datetime, tz = "GMT"), y = value,
+ colour = variable)) + geom_point() + scale_x_datetime(name = "") +
+ scale_y_continuous(name = "") +
+ scale_colour_hue("", breaks = c("running", "exit"),
+ labels = c("All relays", "Exit relays")) +
+ opts(title = "Number of exit relays (past 72 hours)\n")
+ggsave(filename = "website/graphs/exit/exit-72h.png",
+ width = 8, height = 5, dpi = 72)
+
consensuses <- read.csv("stats/consensus-stats", header = TRUE,
stringsAsFactors = FALSE);
consensuses <- consensuses[1:length(consensuses$date)-1,]
diff --git a/website/consensus-graphs.html b/website/consensus-graphs.html
index a3abef3..c6e7697 100644
--- a/website/consensus-graphs.html
+++ b/website/consensus-graphs.html
@@ -56,6 +56,8 @@
</li>
<li>Number of exit relays:
<ul>
+ <li>Past <a href="#exit-72h">72 hours</a> up to
+ now</li>
<li>Past <a href="#exit-30d">30</a>,
<a href="#exit-90d">90</a>,
<a href="#exit-180d">180</a> days</li>
@@ -105,6 +107,7 @@
<img src="graphs/networksize/networksize-2010-03.png"/>
<a id="networksize-2010-02"/>
<img src="graphs/networksize/networksize-2010-02.png"/>
+ <a id="exit-72h"/><img src="graphs/exit/exit-72h.png"/>
<a id="exit-30d"/><img src="graphs/exit/exit-30d.png"/>
<a id="exit-90d"/><img src="graphs/exit/exit-90d.png"/>
<a id="exit-180d"/><img src="graphs/exit/exit-180d.png"/>
--
1.6.5