[or-cvs] [ernie/master 1/2] Split torperf graphs into separate files.

karsten at torproject.org karsten at torproject.org
Wed Mar 10 09:01:54 UTC 2010


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Wed, 10 Mar 2010 09:33:45 +0100
Subject: Split torperf graphs into separate files.
Commit: 3fd35819346f50f53ebc181a98b473cb1a571022

---
 R/torperf.R                 |   25 +++++++++----------------
 website/graphs.html         |    2 +-
 website/torperf-graphs.html |   21 +++++++++++++++------
 3 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/R/torperf.R b/R/torperf.R
index 43c0b4c..e4ad5a4 100644
--- a/R/torperf.R
+++ b/R/torperf.R
@@ -51,23 +51,17 @@ for (intervalInd in 1:length(intervals)) {
   for (sizeInd in 1:length(sizes)) {
     size <- sizes[sizeInd]
     sizePr <- sizePrint[sizeInd]
-    png(paste("website/graphs/torperf/torperf-", size, "-", interval,
-        ".png", sep = ""), width=600, height=height)
-    par(mfrow=c(length(sources), 1))
-    par(mar=c(4.3,3.1,2.1,0.1))
-    maxY <- max(na.omit(subset(t, source %in% paste(sources, size,
-        sep = "-"))$q3)) / 1e3 * .8
     for (sourceInd in 1:length(sources)) {
       sourceStr <- paste(sources[sourceInd], size, sep = "-")
       sourceName <- sources[sourceInd]
+      png(paste("website/graphs/torperf/torperf-", size, "-", sourceName,
+          "-", interval, ".png", sep = ""), width=550, height=350)
+      par(mar=c(2.1,3.1,1.6,0.1))
+      maxY <- max(na.omit(subset(t, source %in% paste(sources, size,
+          sep = "-"))$q3)) / 1e3 * .8
       color <- colors[sourceInd]
-      title <- ""
-      if (sourceInd == 1)
-        title <- paste("Time in seconds to complete", sizePr, "request")
+      title <- paste("Time in seconds to complete", sizePr, "request")
       xlab <- ""
-      if (sourceInd == length(sources))
-        xlab <- paste("Last updated:", as.POSIXlt(Sys.time(), "UTC"),
-        "UTC")
 
       data <- subset(t, source %in% sourceStr)
 
@@ -86,8 +80,7 @@ for (intervalInd in 1:length(intervals)) {
       colquart <- paste(color, "66", sep="")
 
       plot(medians_/1e3, ylim=c(0, maxY), type="l", col=colmed, lwd=2,
-          main=title, axes=FALSE, ylab="", xlab=xlab,
-          cex.main=ifelse(intervalInd == 1, 1.9, 1.25))
+          main=title, axes=FALSE, ylab="", xlab=xlab)
 
       xp <- c()
       yp <- c()
@@ -123,11 +116,11 @@ for (intervalInd in 1:length(intervals)) {
 
       legend(title = paste("Measured times on", sourceName, "per day"),
           x=length(datesStr)/2, xjust=0.5, y=maxY, yjust=1,
-          cex=ifelse(intervalInd == 1, 1.5, 1),
+          #cex=ifelse(intervalInd == 1, 1.5, 1),
           c("Median", "1st to 3rd quartile"), fill=c(colmed, colquart),
           bty="n", ncol=2)
+      dev.off()
     }
-    dev.off()
   }
 }
 
diff --git a/website/graphs.html b/website/graphs.html
index 233a0d1..ee0fc1a 100644
--- a/website/graphs.html
+++ b/website/graphs.html
@@ -98,7 +98,7 @@
         experienced by its users. The graphs contain the average (median)
         time to request files of three different sizes over the network as
         well as first and third quartile of request times.</p>
-        <img src="graphs/torperf/torperf-50kb-6m.png" width="600" height="800"/>
+        <img src="graphs/torperf/torperf-50kb-torperf-6m.png" width="550" height="350"/>
         <p>Graphs for other file sizes or time intervals can be found on a
         <a href="torperf-graphs.html">separate page</a>.</p>
         <br/>
diff --git a/website/torperf-graphs.html b/website/torperf-graphs.html
index 0cbbeaf..a5218a5 100644
--- a/website/torperf-graphs.html
+++ b/website/torperf-graphs.html
@@ -32,12 +32,21 @@
         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-6m.png" width="600" height="800"/>
-        <img src="graphs/torperf/torperf-1mb-6m.png" width="600" height="800"/>
-        <img src="graphs/torperf/torperf-5mb-6m.png" width="600" height="800"/>
-        <img src="graphs/torperf/torperf-50kb-2w.png" width="600" height="400"/>
-        <img src="graphs/torperf/torperf-1mb-2w.png" width="600" height="400"/>
-        <img src="graphs/torperf/torperf-5mb-2w.png" width="600" height="400"/>
+        <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-gabelmoo-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-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-gabelmoo-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-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-gabelmoo-6m.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-5mb-torperf-2w.png" width="550" height="350"/>
+        <img src="graphs/torperf/torperf-5mb-moria-2w.png" width="550" height="350"/>
         <br/>
       </div>
     </div>
-- 
1.6.5




More information about the tor-commits mailing list