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

[or-cvs] [ernie/master] Add torperf graphs covering 12 months.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu, 15 Apr 2010 20:04:31 +0200
Subject: Add torperf graphs covering 12 months.
Commit: b011e17ff1e340070981713731de2c2fea284111

---
 R/torperf.R                 |   25 ++++++++-----------------
 website/torperf-graphs.html |    9 +++++++++
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/R/torperf.R b/R/torperf.R
index 17d5e76..06eb4fa 100644
--- a/R/torperf.R
+++ b/R/torperf.R
@@ -3,8 +3,8 @@
 t <- read.csv("stats/torperf-stats")
 write.csv(t, "website/csv/torperf.csv", quote = FALSE, row.names = FALSE)
 
-intervals <- c("6m", "2w")
-intervalsStr <- c("-6 months", "-2 weeks")
+intervals <- c("12m", "6m", "2w")
+intervalsStr <- c("-12 months", "-6 months", "-2 weeks")
 
 for (intervalInd in 1:length(intervals)) {
   interval <- intervals[intervalInd]
@@ -17,34 +17,25 @@ for (intervalInd in 1:length(intervals)) {
   datesStr <- as.character(dates)
   firstdays <- c()
   for (i in datesStr)
-    if (intervalInd == 2 || format(as.POSIXct(i, tz="GMT"), "%d") == "01")
+    if (intervalInd == 3 || format(as.POSIXct(i, tz="GMT"), "%d") == "01")
       firstdays <- c(firstdays, i)
   monthticks <- which(datesStr %in% firstdays)
   monthlabels <- c() 
   for (i in monthticks[1:(length(monthticks) - 2)])
     monthlabels <- c(monthlabels,
         format(as.POSIXct(dates[i + 1], tz="GMT"),
-        ifelse(intervalInd == 1, "%b", "%b %d")))
+        ifelse(intervalInd == 3, "%b %d", "%b")))
   monthlabels <- c(monthlabels,
       format(as.POSIXct(dates[monthticks[length(monthticks) - 1] + 1]),
-      ifelse(intervalInd == 1, "%b %y", "%b %d")))
-  if (intervalInd == 2)
+      ifelse(intervalInd == 3, "%b %d", "%b %y")))
+  if (intervalInd == 3)
     monthlabels[length(monthlabels)] <- ""
   monthat <- c()
   for (i in 1:(length(monthticks) - 1))
     monthat <- c(monthat, (monthticks[i] + monthticks[i + 1]) / 2 + .5)
 
-  sources <- c()
-  colors <- c()
-  height <- 800
-  if (intervalInd == 1) {
-    sources <- c("siv", "moria", "torperf")
-    colors <- c("#0000EE", "#EE0000", "#00CD00")
-  } else {
-    sources <- c("siv", "moria", "torperf")
-    colors <- c("#0000EE", "#EE0000", "#00CD00")
-    height <- 400
-  }
+  sources <- c("siv", "moria", "torperf")
+  colors <- c("#0000EE", "#EE0000", "#00CD00")
   sizes <- c("5mb", "1mb", "50kb")
   sizePrint <- c("5 MiB", "1 MiB", "50 KiB")
 
diff --git a/website/torperf-graphs.html b/website/torperf-graphs.html
index 0bc46ac..dd3b29f 100644
--- a/website/torperf-graphs.html
+++ b/website/torperf-graphs.html
@@ -32,18 +32,27 @@
         time to request files of three different sizes over the network as
         well as first and third quartile of request times.</p>
         <p><a href="csv/torperf.csv">CSV</a> file containing all data.</p>
+        <img src="graphs/torperf/torperf-50kb-torperf-12m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-50kb-moria-12m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-50kb-siv-12m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-50kb-torperf-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-50kb-moria-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-50kb-siv-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-50kb-torperf-2w.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-50kb-moria-2w.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-50kb-siv-2w.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-1mb-torperf-12m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-1mb-moria-12m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-1mb-siv-12m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-1mb-torperf-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-1mb-moria-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-1mb-siv-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-1mb-torperf-2w.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-1mb-moria-2w.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-1mb-siv-2w.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-5mb-torperf-12m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-5mb-moria-12m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-5mb-siv-12m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-5mb-torperf-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-5mb-moria-6m.png" width="550" height="350"/>
         <img src="graphs/torperf/torperf-5mb-siv-6m.png" width="550" height="350"/>
-- 
1.6.5