[tor-commits] [onionoo/release] Change 3 months graphs to 6 months graphs.

karsten at torproject.org karsten at torproject.org
Mon Sep 10 15:29:14 UTC 2018


commit 5116606732bee287b64b85ed8bedd3559d902926
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Sep 4 20:25:04 2018 +0200

    Change 3 months graphs to 6 months graphs.
    
    Implements #25175.
---
 CHANGELOG.md                                                        | 2 ++
 .../java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java | 4 ++--
 .../java/org/torproject/onionoo/writer/ClientsDocumentWriter.java   | 4 ++--
 .../java/org/torproject/onionoo/writer/UptimeDocumentWriter.java    | 4 ++--
 .../java/org/torproject/onionoo/writer/WeightsDocumentWriter.java   | 4 ++--
 .../org/torproject/onionoo/writer/GraphHistoryCompilerTest.java     | 6 +++---
 6 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5fb5ff9..79d7a9b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@
    - Extend "version" parameter to support lists and ranges.
    - Remove redundant "1_week" and "1_month" graphs from clients
      documents.
+   - Change "3_months" graphs to "6_months" graphs in all documents
+     containing history objects.
 
 
 # Changes in version 6.2-1.17.1 - 2018-08-17
diff --git a/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java
index 47eaa3e..46072bc 100644
--- a/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/BandwidthDocumentWriter.java
@@ -67,7 +67,7 @@ public class BandwidthDocumentWriter implements DocumentWriter {
       "3_days",
       "1_week",
       "1_month",
-      "3_months",
+      "6_months",
       "1_year",
       "5_years" };
 
@@ -75,7 +75,7 @@ public class BandwidthDocumentWriter implements DocumentWriter {
       Period.ofDays(3),
       Period.ofWeeks(1),
       Period.ofMonths(1),
-      Period.ofMonths(3),
+      Period.ofMonths(6),
       Period.ofYears(1),
       Period.ofYears(5) };
 
diff --git a/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java
index 1928bd2..fcd03d6 100644
--- a/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/ClientsDocumentWriter.java
@@ -78,12 +78,12 @@ public class ClientsDocumentWriter implements DocumentWriter {
   }
 
   private String[] graphNames = new String[] {
-      "3_months",
+      "6_months",
       "1_year",
       "5_years" };
 
   private Period[] graphIntervals = new Period[] {
-      Period.ofMonths(3),
+      Period.ofMonths(6),
       Period.ofYears(1),
       Period.ofYears(5) };
 
diff --git a/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java
index 73e8dee..d08f147 100644
--- a/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/UptimeDocumentWriter.java
@@ -79,14 +79,14 @@ public class UptimeDocumentWriter implements DocumentWriter {
   private String[] graphNames = new String[] {
       "1_week",
       "1_month",
-      "3_months",
+      "6_months",
       "1_year",
       "5_years" };
 
   private Period[] graphIntervals = new Period[] {
       Period.ofWeeks(1),
       Period.ofMonths(1),
-      Period.ofMonths(3),
+      Period.ofMonths(6),
       Period.ofYears(1),
       Period.ofYears(5) };
 
diff --git a/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java
index 7d5f1d1..0984367 100644
--- a/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/WeightsDocumentWriter.java
@@ -55,14 +55,14 @@ public class WeightsDocumentWriter implements DocumentWriter {
   private String[] graphNames = new String[] {
       "1_week",
       "1_month",
-      "3_months",
+      "6_months",
       "1_year",
       "5_years" };
 
   private Period[] graphIntervals = new Period[] {
       Period.ofWeeks(1),
       Period.ofMonths(1),
-      Period.ofMonths(3),
+      Period.ofMonths(6),
       Period.ofYears(1),
       Period.ofYears(5) };
 
diff --git a/src/test/java/org/torproject/onionoo/writer/GraphHistoryCompilerTest.java b/src/test/java/org/torproject/onionoo/writer/GraphHistoryCompilerTest.java
index aa091de..de5aa2f 100644
--- a/src/test/java/org/torproject/onionoo/writer/GraphHistoryCompilerTest.java
+++ b/src/test/java/org/torproject/onionoo/writer/GraphHistoryCompilerTest.java
@@ -140,21 +140,21 @@ public class GraphHistoryCompilerTest {
   private final String[] graphNames = new String[] {
       "1_week",
       "1_month",
-      "3_months",
+      "6_months",
       "1_year",
       "5_years" };
 
   private final Period[] graphIntervals = new Period[] {
       Period.ofWeeks(1),
       Period.ofMonths(1),
-      Period.ofMonths(3),
+      Period.ofMonths(6),
       Period.ofYears(1),
       Period.ofYears(5) };
 
   private final long[] dataPointIntervals = new long[] {
       DateTimeHelper.ONE_HOUR,
       DateTimeHelper.FOUR_HOURS,
-      DateTimeHelper.TWELVE_HOURS,
+      DateTimeHelper.ONE_DAY,
       DateTimeHelper.TWO_DAYS,
       DateTimeHelper.TEN_DAYS };
 





More information about the tor-commits mailing list