[tor-commits] [metrics-tasks/master] Update t-shirt script for 6 month graphs

karsten at torproject.org karsten at torproject.org
Wed Sep 12 10:26:46 UTC 2018


commit ff414dc6edfe25dcbb92407d543c690957571254
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Tue Sep 11 17:02:16 2018 +0100

    Update t-shirt script for 6 month graphs
    
    The 3 month graphs were removed in #25175.
---
 task-9889/tshirt.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/task-9889/tshirt.py b/task-9889/tshirt.py
index eddcb6c..48874e3 100755
--- a/task-9889/tshirt.py
+++ b/task-9889/tshirt.py
@@ -88,13 +88,13 @@ def calculate_2mo_avg(response, response_type):
 
   # Check if required data is present in the response
   if response_type == 'uptime':
-    if '3_months' not in response['uptime']:
+    if '6_months' not in response['uptime']:
       return -1
-    data = response['uptime']['3_months']
+    data = response['uptime']['6_months']
   elif response_type == 'bandwidth':
-    if '3_months' not in response['write_history']:
+    if '6_months' not in response['write_history']:
       return -1
-    data = response['write_history']['3_months']
+    data = response['write_history']['6_months']
   # Sum up all values within past 2 months
   _sum = 0
   count = 0



More information about the tor-commits mailing list