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

[tor-commits] [metrics-web/master] Update paths.



commit fca73868aaf07d5e8be3336d4e8f320c728b6701
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Sat Aug 15 13:38:26 2015 +0200

    Update paths.
---
 .gitignore                     |    2 +-
 modules/legacy/config.template |    6 +++---
 website/build.xml              |    2 +-
 website/etc/web.xml            |    4 ++--
 website/rserve/Rserv.conf      |    2 +-
 website/rserve/graphs.R        |   38 +++++++++++++++++++-------------------
 website/rserve/tables.R        |    4 ++--
 7 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/.gitignore b/.gitignore
index aebf570..0323a32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
 .project
 
 # Generated web archive
-ernie.war
+website/metrics.war
 
 # Compiled class files
 classes/
diff --git a/modules/legacy/config.template b/modules/legacy/config.template
index 8a7bc96..ce779d9 100644
--- a/modules/legacy/config.template
+++ b/modules/legacy/config.template
@@ -2,7 +2,7 @@
 #ImportDirectoryArchives 0
 #
 ## Relative path to directory to import directory archives from
-#DirectoryArchivesDirectory /srv/metrics.torproject.org/web/shared/in/recent/relay-descriptors/
+#DirectoryArchivesDirectory /srv/metrics.torproject.org/metrics/shared/in/recent/relay-descriptors/
 #
 ## Keep a history of imported directory archive files to know which files
 ## have been imported before. This history can be useful when importing
@@ -14,7 +14,7 @@
 #ImportSanitizedBridges 0
 #
 ## Relative path to directory to import sanitized bridges from
-#SanitizedBridgesDirectory /srv/metrics.torproject.org/web/shared/in/recent/bridge-descriptors/
+#SanitizedBridgesDirectory /srv/metrics.torproject.org/metrics/shared/in/recent/bridge-descriptors/
 #
 ## Keep a history of imported sanitized bridge descriptors. This history
 ## can be useful when importing from a changing data source to avoid
@@ -43,5 +43,5 @@
 #ImportWriteTorperfStats 0
 #
 ## Relative path to directory to import torperf results from
-#TorperfDirectory /srv/metrics.torproject.org/web/shared/in/recent/torperf/
+#TorperfDirectory /srv/metrics.torproject.org/metrics/shared/in/recent/torperf/
 #
diff --git a/website/build.xml b/website/build.xml
index 6cc4294..52f1780 100644
--- a/website/build.xml
+++ b/website/build.xml
@@ -29,7 +29,7 @@
   <!-- Create a .war file for deployment. -->
   <target name="war"
           depends="compile">
-    <war destfile="ernie.war"
+    <war destfile="metrics.war"
          webxml="etc/web.xml">
       <fileset dir="web"/>
       <lib dir="lib">
diff --git a/website/etc/web.xml b/website/etc/web.xml
index 70580e3..e32f26b 100644
--- a/website/etc/web.xml
+++ b/website/etc/web.xml
@@ -164,7 +164,7 @@
     <init-param>
       <param-name>statsDir</param-name>
       <param-value>
-        /srv/metrics.torproject.org/web/shared/stats/
+        /srv/metrics.torproject.org/metrics/shared/stats/
       </param-value>
     </init-param>
   </servlet>
@@ -330,7 +330,7 @@
   <context-param>
     <param-name>cachedGraphsDir</param-name>
     <param-value>
-      /srv/metrics.torproject.org/web/rserve/graphs/
+      /srv/metrics.torproject.org/metrics/website/rserve/graphs/
     </param-value>
   </context-param>
 
diff --git a/website/rserve/Rserv.conf b/website/rserve/Rserv.conf
index a23af49..1fb3039 100644
--- a/website/rserve/Rserv.conf
+++ b/website/rserve/Rserv.conf
@@ -1,2 +1,2 @@
-workdir /srv/metrics.torproject.org/web/rserve/workdir
+workdir /srv/metrics.torproject.org/metrics/website/rserve/workdir
 source rserve-init.R
diff --git a/website/rserve/graphs.R b/website/rserve/graphs.R
index 63946fe..0e8e0a3 100644
--- a/website/rserve/graphs.R
+++ b/website/rserve/graphs.R
@@ -268,7 +268,7 @@ date_breaks <- function(days) {
 
 plot_networksize <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  s <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "servers.csv", sep = ""), stringsAsFactors = FALSE)
   s <- s[s$date >= start & s$date <= end & s$flag == '' &
          s$country == '' & s$version == '' & s$platform == '' &
@@ -302,7 +302,7 @@ plot_networksize <- function(start, end, path) {
 
 plot_cloudbridges <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  s <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "servers.csv", sep = ""), stringsAsFactors = FALSE)
   s <- s[s$date >= start & s$date <= end & s$flag == '' &
          s$country == '' & s$version == '' & s$platform == '' &
@@ -332,7 +332,7 @@ plot_cloudbridges <- function(start, end, path) {
 
 plot_relaycountries <- function(start, end, country, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  s <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "servers.csv", sep = ""), stringsAsFactors = FALSE)
   s <- s[s$date >= start & s$date <= end & s$flag == '' &
          s$country == ifelse(country == "all", '', country) &
@@ -366,7 +366,7 @@ plot_relaycountries <- function(start, end, country, path) {
 
 plot_versions <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  s <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "servers.csv", sep = ""), stringsAsFactors = FALSE)
   s <- s[s$date >= start & s$date <= end & s$flag == '' &
          s$country == '' & s$version != '' & s$platform == '' &
@@ -401,7 +401,7 @@ plot_versions <- function(start, end, path) {
 
 plot_platforms <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  s <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "servers.csv", sep = ""), stringsAsFactors = FALSE)
   s <- s[s$date >= start & s$date <= end & s$flag == '' &
          s$country == '' & s$version == '' & s$platform != '' &
@@ -429,7 +429,7 @@ plot_platforms <- function(start, end, path) {
 
 plot_bandwidth <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 4))
-  b <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
   b <- b[b$date >= start & b$date <= end & b$isexit == '' &
          b$isguard == '', ]
@@ -458,7 +458,7 @@ plot_bandwidth <- function(start, end, path) {
 
 plot_bwhist_flags <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 4))
-  b <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
   b <- b[b$date >= start & b$date <= end & b$isexit != '' &
          b$isguard != '', ]
@@ -503,7 +503,7 @@ plot_bwhist_flags <- function(start, end, path) {
 
 plot_dirbytes <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 4))
-  b <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
   b <- b[b$date >= start & b$date <= end & b$isexit == '' &
          b$isguard == '', ]
@@ -532,7 +532,7 @@ plot_dirbytes <- function(start, end, path) {
 
 plot_relayflags <- function(start, end, flags, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  s <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  s <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "servers.csv", sep = ""), stringsAsFactors = FALSE)
   s <- s[s$date >= start & s$date <= end & s$country == '' &
          s$version == '' & s$platform == '' & s$ec2bridge == '', ]
@@ -574,7 +574,7 @@ plot_torperf <- function(start, end, source, filesize, path) {
   end <- min(end, as.character(Sys.Date() - 2))
   size <- ifelse(filesize == '50kb', 50 * 1024,
           ifelse(filesize == '1mb', 1024 * 1024, 5 * 1024 * 1024))
-  t <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "torperf.csv", sep = ""), stringsAsFactors = FALSE)
   t <- t[t$date >= start & t$date <= end & t$size == size &
          t$source == ifelse(source == 'all', '', source), ]
@@ -622,7 +622,7 @@ plot_torperf_failures <- function(start, end, source, filesize, path) {
   end <- min(end, as.character(Sys.Date() - 2))
   size <- ifelse(filesize == '50kb', 50 * 1024,
           ifelse(filesize == '1mb', 1024 * 1024, 5 * 1024 * 1024))
-  t <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "torperf.csv", sep = ""), stringsAsFactors = FALSE)
   t <- t[t$date >= start & t$date <= end & t$size == size &
          t$source == ifelse(source == 'all', '', source), ]
@@ -673,7 +673,7 @@ plot_torperf_failures <- function(start, end, source, filesize, path) {
 
 plot_connbidirect <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  c <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  c <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "connbidirect.csv", sep = ""), stringsAsFactors = FALSE)
   c <- c[c$date >= start & c$date <= end &
          c$read + c$write + c$both > 0, ]
@@ -718,7 +718,7 @@ plot_connbidirect <- function(start, end, path) {
 
 plot_bandwidth_flags <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 4))
-  b <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  b <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "bandwidth.csv", sep = ""), stringsAsFactors = FALSE)
   b <- b[b$date >= start & b$date <= end & b$isexit != '' &
          b$isguard != '', ]
@@ -782,7 +782,7 @@ plot_bandwidth_flags <- function(start, end, path) {
 plot_userstats <- function(start, end, node, variable, value, events,
                            path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  c <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  c <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "clients.csv", sep = ""), stringsAsFactors = FALSE)
   u <- c[c$date >= start & c$date <= end, ]
   if (node == 'relay') {
@@ -937,7 +937,7 @@ plot_userstats_bridge_version <- function(start, end, version, path) {
 
 plot_advbwdist_perc <- function(start, end, p, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  t <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "advbwdist.csv", sep = ""), stringsAsFactors = FALSE)
   t <- t[t$date >= start & t$date <= end &
          t$percentile %in% as.numeric(p), ]
@@ -965,7 +965,7 @@ plot_advbwdist_perc <- function(start, end, p, path) {
 
 plot_advbwdist_relay <- function(start, end, n, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  t <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  t <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "advbwdist.csv", sep = ""), stringsAsFactors = FALSE)
   t <- t[t$date >= start & t$date <= end & t$relay %in% as.numeric(n), ]
   t <- data.frame(date = t$date, advbw = t$advbw * 8 / 1e9,
@@ -991,7 +991,7 @@ plot_advbwdist_relay <- function(start, end, n, path) {
 
 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/",
+  h <- read.csv(paste("/srv/metrics.torproject.org/metrics/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),
@@ -1012,7 +1012,7 @@ plot_hidserv_dir_onions_seen <- function(start, end, path) {
 
 plot_hidserv_rend_relayed_cells <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  h <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "hidserv.csv", sep = ""), stringsAsFactors = FALSE)
   h <- h[h$date >= start & h$date <= end &
          h$type == "rend-relayed-cells", ]
@@ -1034,7 +1034,7 @@ plot_hidserv_rend_relayed_cells <- function(start, end, path) {
 
 plot_hidserv_frac_reporting <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date() - 2))
-  h <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  h <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "hidserv.csv", sep = ""), stringsAsFactors = FALSE)
   h <- h[h$date >= start & h$date <= end, ]
   h <- rbind(data.frame(date = NA, frac = 0,
diff --git a/website/rserve/tables.R b/website/rserve/tables.R
index f298c62..54d887c 100644
--- a/website/rserve/tables.R
+++ b/website/rserve/tables.R
@@ -4,7 +4,7 @@ countrynames <- function(countries) {
 
 write_userstats <- function(start, end, node, path) {
   end <- min(end, as.character(Sys.Date()))
-  c <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  c <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "clients.csv", sep = ""), stringsAsFactors = FALSE)
   c <- c[c$date >= start & c$date <= end & c$country != '' &
          c$transport == '' & c$version == '' & c$node == node, ]
@@ -35,7 +35,7 @@ write_userstats_bridge <- function(start, end, path) {
 
 write_userstats_censorship_events <- function(start, end, path) {
   end <- min(end, as.character(Sys.Date()))
-  c <- read.csv(paste("/srv/metrics.torproject.org/web/shared/stats/",
+  c <- read.csv(paste("/srv/metrics.torproject.org/metrics/shared/stats/",
                 "clients.csv", sep = ""), stringsAsFactors = FALSE)
   c <- c[c$date >= start & c$date <= end & c$country != '' &
          c$transport == '' & c$version == '' & c$node == 'relay', ]

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits