[tor-commits] [sbws/maint-1.1] fix: scaling: Return mean if no bw >= mean
juga at torproject.org
juga at torproject.org
Tue Mar 16 14:17:53 UTC 2021
commit bd57e473e2975bf0ef1a0abae214a59f115223b8
Author: juga0 <juga at riseup.net>
Date: Mon Mar 15 14:10:33 2021 +0000
fix: scaling: Return mean if no bw >= mean
---
sbws/lib/scaling.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbws/lib/scaling.py b/sbws/lib/scaling.py
index 2f63886..5415f63 100644
--- a/sbws/lib/scaling.py
+++ b/sbws/lib/scaling.py
@@ -27,7 +27,7 @@ def bw_filt(bw_measurements):
bws_gte_mean = list(filter(lambda bw: bw >= mu, bw_measurements))
if bws_gte_mean:
return round(mean(bws_gte_mean))
- return 1
+ return mu
def network_means_by_relay_type(bw_lines, router_statuses_d):
More information about the tor-commits
mailing list