[tor-commits] [metrics-web/master] Include op-ab in OnionPerf graphs.

karsten at torproject.org karsten at torproject.org
Thu Jan 24 11:13:20 UTC 2019


commit 82aa20a17cb8ff827873e6d0a776b9e2967197bb
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Thu Jan 24 12:10:03 2019 +0100

    Include op-ab in OnionPerf graphs.
    
    Turns out that op-ab's domain name matches our '%.onion%' regex, that
    we're using to distinguish public from onion server requests. Trying a
    bit harder to distinguish the two.
    
    Related to #29107.
---
 src/main/sql/onionperf/init-onionperf.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/sql/onionperf/init-onionperf.sql b/src/main/sql/onionperf/init-onionperf.sql
index 49eff4a..e9af3b1 100644
--- a/src/main/sql/onionperf/init-onionperf.sql
+++ b/src/main/sql/onionperf/init-onionperf.sql
@@ -68,7 +68,7 @@ FROM (
 SELECT DATE(start) AS date,
   filesize,
   source,
-  CASE WHEN endpointremote LIKE '%.onion%' THEN 'onion'
+  CASE WHEN endpointremote LIKE '%.onion:%' THEN 'onion'
     ELSE 'public' END AS server,
   CASE WHEN COUNT(*) > 0 THEN
     PERCENTILE_CONT(ARRAY[0.25,0.5,0.75]) WITHIN GROUP(ORDER BY datacomplete)
@@ -85,7 +85,7 @@ UNION
 SELECT DATE(start) AS date,
   filesize,
   '' AS source,
-  CASE WHEN endpointremote LIKE '%.onion%' THEN 'onion'
+  CASE WHEN endpointremote LIKE '%.onion:%' THEN 'onion'
     ELSE 'public' END AS server,
   CASE WHEN COUNT(*) > 0 THEN
     PERCENTILE_CONT(ARRAY[0.25,0.5,0.75]) WITHIN GROUP(ORDER BY datacomplete)
@@ -137,7 +137,7 @@ SELECT date,
 FROM (
 SELECT DATE(start) AS date,
   source,
-  CASE WHEN endpointremote LIKE '%.onion%' THEN 'onion'
+  CASE WHEN endpointremote LIKE '%.onion:%' THEN 'onion'
     ELSE 'public' END AS server,
   PERCENTILE_CONT(ARRAY[0.25,0.5,0.75])
   WITHIN GROUP(ORDER BY dataresponse - datarequest) AS q
@@ -149,7 +149,7 @@ GROUP BY date, source, server
 UNION
 SELECT DATE(start) AS date,
   '' AS source,
-  CASE WHEN endpointremote LIKE '%.onion%' THEN 'onion'
+  CASE WHEN endpointremote LIKE '%.onion:%' THEN 'onion'
     ELSE 'public' END AS server,
   PERCENTILE_CONT(ARRAY[0.25,0.5,0.75])
   WITHIN GROUP(ORDER BY dataresponse - datarequest) AS q



More information about the tor-commits mailing list