[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [metrics-web/master] Add Torperf graph covering all sources and make it the default.
commit 1808866050e77d6a0f2fcf5c0b4f5319f661cbb4
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed Jan 26 15:08:38 2011 +0100
Add Torperf graph covering all sources and make it the default.
---
rserve/graphs.R | 6 +++---
.../ernie/web/GraphParameterChecker.java | 4 ++--
web/WEB-INF/performance.jsp | 1 +
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/rserve/graphs.R b/rserve/graphs.R
index 043ad54..cafe644 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -349,8 +349,8 @@ plot_torperf <- function(start, end, source, filesize, path) {
torperf <- rbind(torperf,
data.frame(date = as.Date(missing, origin = "1970-01-01"),
q1 = NA, md = NA, q3 = NA))
- colours <- data.frame(source = c("siv", "moria", "torperf"),
- colour = c("#0000EE", "#EE0000", "#00CD00"),
+ colours <- data.frame(source = c("all", "siv", "moria", "torperf"),
+ colour = c("#FF8C00", "#0000EE", "#EE0000", "#00CD00"),
stringsAsFactors = FALSE)
colour <- colours[colours$source == source, "colour"]
filesizes <- data.frame(filesizes = c("5mb", "1mb", "50kb"),
@@ -366,7 +366,7 @@ plot_torperf <- function(start, end, source, filesize, path) {
"https://metrics.torproject.org/", sep = "")) +
scale_y_continuous(name = "", limits = c(0, maxY) / 1e3) +
scale_fill_manual(name = paste("Measured times on",
- source, "per day"),
+ ifelse(source == "all", "all sources", source), "per day"),
breaks = c("line", "ribbon"),
labels = c("Median", "1st to 3rd quartile"),
values = paste(colour, c("", "66"), sep = "")) +
diff --git a/src/org/torproject/ernie/web/GraphParameterChecker.java b/src/org/torproject/ernie/web/GraphParameterChecker.java
index f1864fb..9db37e3 100644
--- a/src/org/torproject/ernie/web/GraphParameterChecker.java
+++ b/src/org/torproject/ernie/web/GraphParameterChecker.java
@@ -63,7 +63,7 @@ public class GraphParameterChecker {
this.knownParameterValues.put("country", "all,au,bh,br,ca,cn,cu,de,"
+ "et,fr,gb,ir,it,jp,kr,mm,pl,ru,sa,se,sy,tn,tm,us,uz,vn,ye");
this.knownParameterValues.put("bundle", "all,en,zh_CN,fa");
- this.knownParameterValues.put("source", "siv,moria,torperf");
+ this.knownParameterValues.put("source", "all,siv,moria,torperf");
this.knownParameterValues.put("filesize", "50kb,1mb,5mb");
}
@@ -214,7 +214,7 @@ public class GraphParameterChecker {
return null;
}
} else {
- sourceParameter = new String[] { "torperf" };
+ sourceParameter = new String[] { "all" };
}
recognizedGraphParameters.put("source", sourceParameter);
}
diff --git a/web/WEB-INF/performance.jsp b/web/WEB-INF/performance.jsp
index 8d71812..2aeb7db 100644
--- a/web/WEB-INF/performance.jsp
+++ b/web/WEB-INF/performance.jsp
@@ -34,6 +34,7 @@ quartile of request times.</p>
value="${torperf_end[0]}">
</p><p>
Source:
+ <input type="radio" name="source" value="all"> all
<input type="radio" name="source" value="torperf"> torperf
<input type="radio" name="source" value="moria"> moria
<input type="radio" name="source" value="siv"> siv