Commit 63804459 authored by juga's avatar juga
Browse files

Merge branch 'ticket28215_torflow_min'

parents 4901c66a 19713fa1
......@@ -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
......
......@@ -767,7 +767,7 @@ class V3BWFile(object):
# mean (Torflow's strm_avg)
mu = mean([l.bw_mean for l in bw_lines])
# filtered mean (Torflow's filt_avg)
muf = mean([min(l.bw_mean, mu) for l in bw_lines])
muf = mean([max(l.bw_mean, mu) for l in bw_lines])
# bw sum (Torflow's tot_net_bw or tot_sbw)
sum_bw = sum([l.bw_mean for l in bw_lines])
# Torflow's clipping
......@@ -785,7 +785,7 @@ class V3BWFile(object):
bw_new = kb_round_x_sig_dig(
max(
l.bw_mean / mu, # ratio
min(l.bw_mean, mu) / muf # ratio filtered
max(l.bw_mean, mu) / muf # ratio filtered
) * desc_bw_obs, \
digits=num_round_dig) # convert to KB
# Cap maximum bw
......
Supports Markdown
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