[tor-commits] [metrics-web/master] Include client numbers with fractions up to 110%.

karsten at torproject.org karsten at torproject.org
Fri Nov 30 09:27:59 UTC 2018


commit 3b5a2fb6c87a98508ab1633792f5c5176f6ffc31
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Fri Nov 30 10:22:35 2018 +0100

    Include client numbers with fractions up to 110%.
    
    Turns out that almost all relays report directory-request statistics
    these days, including a small number of relays that temporarily drop
    out of the consensus. We're now accepting up to 10% of those
    additional statistics.
    
    See #28305 for more details.
---
 src/main/sql/clients/init-userstats.sql | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/sql/clients/init-userstats.sql b/src/main/sql/clients/init-userstats.sql
index 38521f2..cf2b620 100644
--- a/src/main/sql/clients/init-userstats.sql
+++ b/src/main/sql/clients/init-userstats.sql
@@ -678,8 +678,13 @@ CREATE OR REPLACE VIEW estimated AS SELECT
     FROM aggregated WHERE hh * nn > 0.0) a
 
   -- Only include estimates with at least 10% of nodes reporting directory
-  -- request statistics.
-  WHERE a.frac BETWEEN 0.1 AND 1.0
+  -- request statistics, and exclude estimates with fractions higher than 110%.
+  -- The upper bound is 110% and not 100%, because there can be relays reporting
+  -- statistics that temporarily didn't make it into the consensus, and we
+  -- accept up to 10% of those additional statistics. However, there needs to be
+  -- some upper bound to exclude obvious outliers with fractions of 120%, 150%,
+  -- or even 200%. See #28305 for more details.
+  WHERE a.frac BETWEEN 0.1 AND 1.1
 
   -- Skip estimates that are as recent as yesterday or newer.
   AND a.date < current_date - 1



More information about the tor-commits mailing list