Commit 19713fa1 authored by juga  's avatar juga
Browse files

Replace mininum by maximum in bandwidth filtered

Bandwidth filtered is the maximum between the bandwidth
measurements and their mean, not the minimum (#28215)
parent ed1d61c9
......@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Update python minimal version in setup (#28043)
- Catch unhandled exception when we fail to resolve a domain name (#28141)
- Bandwidth filtered is the maximum between the bandwidth measurements and
their mean, not the minimum (#28215)
### Changed
......@@ -24,8 +26,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Write bw file only when the percentage of measured relays is bigger than 60%
(#28062)
- When the percentage of measured relays is less than the 60%, do not include
the relays in the bandwidth file and instead include some statistics in the
- When the percentage of measured relays is less than the 60%, do not include
the relays in the bandwidth file and instead include some statistics in the
header (#28076)
- When the percentage of measured relays is less than the 60% and it was more
before, warn about it (#28155)
......
......@@ -763,7 +763,7 @@ class V3BWFile(object):
# mean (Torflow's strm_avg)
mu = mean([l.bw_bs_mean for l in bw_lines])
# filtered mean (Torflow's filt_avg)
muf = mean([min(l.bw_bs_mean, mu) for l in bw_lines])
muf = mean([max(l.bw_bs_mean, mu) for l in bw_lines])
# bw sum (Torflow's tot_net_bw or tot_sbw)
sum_bw = sum([l.bw_bs_mean for l in bw_lines])
# Torflow's clipping
......@@ -781,7 +781,7 @@ class V3BWFile(object):
bw_new = kb_round_x_sig_dig(
max(
l.bw_bs_mean / mu, # ratio
min(l.bw_bs_mean, mu) / muf # ratio filtered
max(l.bw_bs_mean, mu) / muf # ratio filtered
) * desc_obs_bw, \
digits=num_round_dig) # convert to KB
# Cap maximum bw
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment