commit 1dc26636331f26d232dbbd7b3e5e5a78cb4df85e Author: Karsten Loesing karsten.loesing@gmx.net Date: Tue May 7 06:18:30 2013 +0200
Add CSV link for new user estimates. --- rserve/csv.R | 8 ++++++++ .../ernie/web/graphs/RObjectGenerator.java | 1 + web/WEB-INF/users.jsp | 6 ++++++ 3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/rserve/csv.R b/rserve/csv.R index 9fdfbbd..efb4486 100644 --- a/rserve/csv.R +++ b/rserve/csv.R @@ -292,3 +292,11 @@ export_bandwidth_flags <- function(path) { quote = FALSE, row.names = FALSE) }
+export_userstats <- function(path) { + u <- read.csv(paste("/srv/metrics.torproject.org/task-8462-graphs/", + "task-8462/userstats.csv", sep = ""), + stringsAsFactors = FALSE) + write.csv(format(u, trim = TRUE, scientific = FALSE), path, + quote = FALSE, row.names = FALSE) +} + diff --git a/src/org/torproject/ernie/web/graphs/RObjectGenerator.java b/src/org/torproject/ernie/web/graphs/RObjectGenerator.java index 1fb7183..69092e6 100644 --- a/src/org/torproject/ernie/web/graphs/RObjectGenerator.java +++ b/src/org/torproject/ernie/web/graphs/RObjectGenerator.java @@ -73,6 +73,7 @@ public class RObjectGenerator implements ServletContextListener { this.availableCsvFiles.add("relayflags"); this.availableCsvFiles.add("torperf"); this.availableCsvFiles.add("torperf-failures"); + this.availableCsvFiles.add("userstats"); this.availableCsvFiles.add("versions");
this.availableTables = new HashMap<String, String>(); diff --git a/web/WEB-INF/users.jsp b/web/WEB-INF/users.jsp index d7d17d5..93b89b8 100644 --- a/web/WEB-INF/users.jsp +++ b/web/WEB-INF/users.jsp @@ -374,6 +374,12 @@ IPv6 numbers will become more accurate over time.</font> <p>Download graph as <a href="userstats-bridge-version.pdf${userstats_bridge_version_url}">PDF</a> or <a href="userstats-bridge-version.svg${userstats_bridge_version_url}">SVG</a>.</p> +<hr> + +<p><a href="csv/userstats.csv">CSV</a> file containing new user +estimates (BETA).</p> +<br> + </div> </div> <div class="bottom" id="bottom">
tor-commits@lists.torproject.org