[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Add graph for unique .onion addresses.
commit 534930bd5f0df49c1e6383667deeddfcbad49e0d
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Fri Mar 13 16:18:34 2015 +0100
Add graph for unique .onion addresses.
---
website/etc/web.xml | 4 ++++
website/rserve/graphs.R | 21 ++++++++++++++++++++
.../metrics/web/graphs/GraphsSubpagesServlet.java | 2 ++
.../metrics/web/graphs/RObjectGenerator.java | 2 ++
website/web/WEB-INF/hidserv-data.jsp | 1 +
website/web/WEB-INF/index.jsp | 1 +
6 files changed, 31 insertions(+)
diff --git a/website/etc/web.xml b/website/etc/web.xml
index b9049ac..09c0a8b 100644
--- a/website/etc/web.xml
+++ b/website/etc/web.xml
@@ -65,6 +65,7 @@
<url-pattern>/torperf-data.html</url-pattern>
<url-pattern>/connbidirect-data.html</url-pattern>
<url-pattern>/hidserv-data.html</url-pattern>
+ <url-pattern>/hidserv-dir-onions-seen.html</url-pattern>
</servlet-mapping>
<servlet>
@@ -246,6 +247,9 @@
<url-pattern>/advbwdist-relay.png</url-pattern>
<url-pattern>/advbwdist-relay.pdf</url-pattern>
<url-pattern>/advbwdist-relay.svg</url-pattern>
+ <url-pattern>/hidserv-dir-onions-seen.png</url-pattern>
+ <url-pattern>/hidserv-dir-onions-seen.pdf</url-pattern>
+ <url-pattern>/hidserv-dir-onions-seen.svg</url-pattern>
</servlet-mapping>
<servlet>
diff --git a/website/rserve/graphs.R b/website/rserve/graphs.R
index 00dfe39..7f68854 100644
--- a/website/rserve/graphs.R
+++ b/website/rserve/graphs.R
@@ -989,3 +989,24 @@ plot_advbwdist_relay <- function(start, end, n, path) {
ggsave(filename = path, width = 8, height = 5, dpi = 72)
}
+plot_hidserv_dir_onions_seen <- function(start, end, path) {
+ end <- min(end, as.character(Sys.Date() - 2))
+ h <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+ "hidserv.csv", sep = ""), stringsAsFactors = FALSE)
+ h <- h[h$date >= start & h$date <= end & h$type == "dir-onions-seen", ]
+ h <- rbind(data.frame(date = NA, wiqm = 0),
+ data.frame(date = as.Date(h$date, "%Y-%m-%d"),
+ wiqm = ifelse(h$frac >= 0.01, h$wiqm, NA)))
+ date_breaks <- date_breaks(as.numeric(max(h$date, na.rm = TRUE)
+ - min(h$date, na.rm = TRUE)))
+ ggplot(h, aes(x = date, y = wiqm)) +
+ geom_line(size = 0.75) +
+ scale_x_date(name = paste("\nThe Tor Project - ",
+ "https://metrics.torproject.org/", sep = ""),
+ format = date_breaks$format, major = date_breaks$major,
+ minor = date_breaks$minor) +
+ scale_y_continuous(name = "") +
+ opts(title = "Unique .onion addresses\n")
+ ggsave(filename = path, width = 8, height = 5, dpi = 72)
+}
+
diff --git a/website/src/org/torproject/metrics/web/graphs/GraphsSubpagesServlet.java b/website/src/org/torproject/metrics/web/graphs/GraphsSubpagesServlet.java
index beb3e69..0333f4d 100644
--- a/website/src/org/torproject/metrics/web/graphs/GraphsSubpagesServlet.java
+++ b/website/src/org/torproject/metrics/web/graphs/GraphsSubpagesServlet.java
@@ -92,6 +92,8 @@ public class GraphsSubpagesServlet extends HttpServlet {
"WEB-INF/connbidirect-data.jsp");
this.availableGraphsSubpages.put("hidserv-data.html",
"WEB-INF/hidserv-data.jsp");
+ this.availableGraphsSubpages.put("hidserv-dir-onions-seen.html",
+ "WEB-INF/hidserv-dir-onions-seen.jsp");
this.availableGraphsSubpageTables = new HashMap<String, String>();
this.availableGraphsSubpageTables.put("userstats-relay-table.html",
diff --git a/website/src/org/torproject/metrics/web/graphs/RObjectGenerator.java b/website/src/org/torproject/metrics/web/graphs/RObjectGenerator.java
index 1179137..b598192 100644
--- a/website/src/org/torproject/metrics/web/graphs/RObjectGenerator.java
+++ b/website/src/org/torproject/metrics/web/graphs/RObjectGenerator.java
@@ -86,6 +86,8 @@ public class RObjectGenerator implements ServletContextListener {
"start,end,version,filename");
this.availableGraphs.put("advbwdist-perc", "start,end,p,filename");
this.availableGraphs.put("advbwdist-relay", "start,end,n,filename");
+ this.availableGraphs.put("hidserv-dir-onions-seen",
+ "start,end,filename");
this.availableGraphFileTypes = new HashSet<String>(Arrays.asList(
"png,pdf,svg".split(",")));
diff --git a/website/web/WEB-INF/hidserv-data.jsp b/website/web/WEB-INF/hidserv-data.jsp
index 2d9bb31..ef31f86 100644
--- a/website/web/WEB-INF/hidserv-data.jsp
+++ b/website/web/WEB-INF/hidserv-data.jsp
@@ -51,6 +51,7 @@ network fraction.</li>
<h4>Related metrics</h4>
<ul>
+<li><a href="hidserv-dir-onions-seen.html">Graph: Unique .onion addresses</a></li>
<li><a href="relayflags.html">Graph: Relays with Exit, Fast, Guard, Stable, and HSDir flags</a></li>
</ul>
diff --git a/website/web/WEB-INF/index.jsp b/website/web/WEB-INF/index.jsp
index 29141e4..182935b 100644
--- a/website/web/WEB-INF/index.jsp
+++ b/website/web/WEB-INF/index.jsp
@@ -89,6 +89,7 @@
traffic do they handle?</p>
<ul>
+<li><a href="hidserv-dir-onions-seen.html">Graph: Unique .onion addresses</a></li>
<li><a href="hidserv-data.html">Data: Hidden-service statistics</a></li>
</ul>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits