[tor-commits] [sbws/master] Use num relays in the net to calculate percent

juga at torproject.org juga at torproject.org
Wed Oct 24 09:40:24 UTC 2018


commit 7ad67810cb165cc6399dfbaa2537140db8109ea0
Author: juga0 <juga at riseup.net>
Date:   Tue Oct 23 12:25:16 2018 +0000

    Use num relays in the net to calculate percent
---
 sbws/lib/v3bwfile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index c6fa089..f1a2d25 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -817,7 +817,7 @@ class V3BWFile(object):
         statsd['num_target_relays'] = round(statsd['num_net_relays']
                                             * MIN_REPORT / 100)
         statsd['perc_measured_relays'] = round(len(bw_lines) * 100
-                                               / statsd['num_target_relays'])
+                                               / statsd['num_net_relays'])
         statsd['perc_measured_targed'] = MIN_REPORT
         if statsd['num_measured_relays'] < statsd['num_target_relays']:
             log.warning('The percentage of the measured relays is less than'





More information about the tor-commits mailing list