commit 6ecb3948efd1d13416cdf1460453ad12c9e6313e Author: juga0 juga@riseup.net Date: Fri Jun 11 13:02:03 2021 +0000
chg: v3bwfile: Stop scaling with consensus weight
because when the observed bandwidth is higher than the consensus (for example when the relay is new or was some time down), it's limited by the previous consensus, not allowing it to grow.
Since the size of the data to download depends also on the consensus weight, this results on lower measured bandwidth too.
Closes #40091. --- docs/source/activity_aggr_lines.puml | 8 +++--- docs/source/activity_scaling_as_torflow.puml | 3 +-- docs/source/images/activity_aggr_lines.svg | 18 ++++++------- docs/source/images/activity_scaling_as_torflow.svg | 11 ++++---- sbws/lib/v3bwfile.py | 30 +++++----------------- tests/unit/lib/test_v3bwfile.py | 4 +-- 6 files changed, 27 insertions(+), 47 deletions(-)
diff --git a/docs/source/activity_aggr_lines.puml b/docs/source/activity_aggr_lines.puml index b9b9e42..a6112f1 100644 --- a/docs/source/activity_aggr_lines.puml +++ b/docs/source/activity_aggr_lines.puml @@ -19,13 +19,13 @@ if (not results_recent?) then (yes) stop endif if (node_id in router_statuses_d?) then (yes) - :consensus_bandwidth; + :consensus_bandwidth from router statuses; else (no) - :consensus_bandwidth; + :consensus_bandwidth from results; endif :obs_last; -if (obs_last is None and consensus_bandwidth is None?) then (yes) - :return(cls(node_id, 1), "no_consensus_no_observed_bw"); +if (obs_last is None?) then (yes) + :return(cls(node_id, 1), "no_observed_bw"); stop endif :bw; diff --git a/docs/source/activity_scaling_as_torflow.puml b/docs/source/activity_scaling_as_torflow.puml index 65a4457..1789dff 100644 --- a/docs/source/activity_scaling_as_torflow.puml +++ b/docs/source/activity_scaling_as_torflow.puml @@ -10,11 +10,10 @@ start while (for l in bw_lines?) :bw_obs; :desc_bw = min(desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg); - :min_bandwidth = min(desc_bw, l.consensus_bandwidth); :ratio_stream = l.bw_mean / mu; :ratio_stream_filtered = l.bw_filt / muf; :ratio = max(ratio_stream, ratio_stream_filtered); - :l.bw = ratio * min_bandwidth; + :l.bw = ratio * desc_bw; if (router_statuses_d?) then (yes) if (l.node_id in router_statuses_d?) then (yes) :sum_bw += l.bw; diff --git a/docs/source/images/activity_aggr_lines.svg b/docs/source/images/activity_aggr_lines.svg index 789a97b..6774533 100644 --- a/docs/source/images/activity_aggr_lines.svg +++ b/docs/source/images/activity_aggr_lines.svg @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1285px" preserveAspectRatio="none" style="width:430px;height:1285px;" version="1.1" viewBox="0 0 430 1285" width="430px" zoomAndPan="magnify"><defs><filter height="300%" id="fsu3zpce5sdbv" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="406" x="12" y="26.708">Activity diagram sbws V3BWLine.from_results</text><ellipse cx="203" cy="40.9531" fill="#000000" filter="url(#fsu3zpce5sdbv)" rx="10" ry ="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="120" x="143" y="70.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="100" x="153" y="92.0918">success_results</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="189" x="108.5" y="173.3242"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="169" x="118.5" y="194.4629">return (, exclusion_reason)</text><ellipse cx="203" cy="244.8086" fill="none" filter="url(#fsu3zpce5sdbv)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="203.5" cy="245.3086" fill="#000000" filter="url(#fsu3zpce5sdbv)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter= "url(#fsu3zpce5sdbv)" points="142.5,124.9219,263.5,124.9219,275.5,136.9219,263.5,148.9219,142.5,148.9219,130.5,136.9219,142.5,124.9219" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="207" y="159.1323">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="121" x="142.5" y="140.73">not success_results?</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="100" x="153" y="296.8086"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="80" x="163" y="317.9473">results_away</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="189" x="108.5" y="399.1797"/><text fill="#000000" font-family="san s-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="169" x="118.5" y="420.3184">return (, exclusion_reason)</text><ellipse cx="203" cy="470.6641" fill="none" filter="url(#fsu3zpce5sdbv)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="203.5" cy="471.1641" fill="#000000" filter="url(#fsu3zpce5sdbv)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" points="151.5,350.7773,254.5,350.7773,266.5,362.7773,254.5,374.7773,151.5,374.7773,139.5,362.7773,151.5,350.7773" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="207" y="384.9878">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="103" x="151.5" y="366.5854">not results_away?</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" sty le="stroke: #A80036; stroke-width: 1.5;" width="110" x="148" y="522.6641"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="90" x="158" y="543.8027">results_recent</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="189" x="108.5" y="625.0352"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="169" x="118.5" y="646.1738">return (, exclusion_reason)</text><ellipse cx="203" cy="696.5195" fill="none" filter="url(#fsu3zpce5sdbv)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="203.5" cy="697.0195" fill="#000000" filter="url(#fsu3zpce5sdbv)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" points="148,576.6328,258,576.6328,270,588.6328,258,600.6328,148,600.6328,136,588.6328,148,576.6328" style="stroke: # A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="207" y="610.8433">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="110" x="148" y="592.4409">not results_recent?</text><polygon fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" points="117,748.5195,289,748.5195,301,760.5195,289,772.5195,117,772.5195,105,760.5195,117,748.5195" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="172" x="117" y="764.3276">node_id in router_statuses_d?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="85" y="757.9253">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="301" y="757.9253">no</text><rect fill="#FEFECE" filter= "url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="159" x="15.5" y="782.5195"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="139" x="25.5" y="803.6582">consensus_bandwidth</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="159" x="231.5" y="782.5195"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="139" x="241.5" y="803.6582">consensus_bandwidth</text><polygon fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" points="203,822.4883,215,834.4883,203,846.4883,191,834.4883,203,822.4883" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="72" x="167" y="866.4883"/><text fill="#000000" font-family="sans- serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="52" x="177" y="887.627">obs_last</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="378" x="14" y="968.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="358" x="24" y="989.998">return(cls(node_id, 1), "no_consensus_no_observed_bw")</text><ellipse cx="203" cy="1040.3438" fill="none" filter="url(#fsu3zpce5sdbv)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="203.5" cy="1040.8438" fill="#000000" filter="url(#fsu3zpce5sdbv)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" points="51.5,920.457,354.5,920.457,366.5,932.457,354.5,944.457,51.5,944.457,39.5,932.457,51.5,920.457" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" length Adjust="spacingAndGlyphs" textLength="20" x="207" y="954.6675">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="303" x="51.5" y="936.2651">obs_last is None and consensus_bandwidth is None?</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="37" x="184.5" y="1092.3438"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="17" x="194.5" y="1113.4824">bw</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="86" x="160" y="1146.3125"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="66" x="170" y="1167.4512">kwargs[...]</text><rect fill="#FEFECE" filter="url(#fsu3zpce5sdbv)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; st roke-width: 1.5;" width="252" x="77" y="1200.2813"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="232" x="87" y="1221.4199">return (node_id, bw, **kwargs), None</text><ellipse cx="203" cy="1264.25" fill="none" filter="url(#fsu3zpce5sdbv)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="203.5" cy="1264.75" fill="#000000" filter="url(#fsu3zpce5sdbv)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="50.9531" y2="70.9531"/><polygon fill="#A80036" points="199,60.9531,203,70.9531,207,60.9531,203,64.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="207.293" y2="234.8086"/><polygon fill="#A80036" points="199,224.8086,203,234.8086,207,224.8086,203,228.8086" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="148.9219" y2="173.3242"/><polygon fill="#A80036" points="199,163.3242,203,173.3242,207,163.3242,203,167.3242" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="275.5" x2="307.5" y1="136.9219" y2="136.9219"/><polygon fill="#A80036" points="303.5,204.8086,307.5,214.8086,311.5,204.8086,307.5,208.8086" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="307.5" x2="307.5" y1="136.9219" y2="276.8086"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="307.5" x2="203" y1="276.8086" y2="276.8086"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="276.8086" y2="296.8086"/><polygon fill="#A80036" points="199,286.8086,203,296.8086,207,286.8086,203,290.8086" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="104.9219" y2="124.9219"/><polygon fill="#A80036" points="199,114.9219,203,124.9219,207,114 .9219,203,118.9219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="433.1484" y2="460.6641"/><polygon fill="#A80036" points="199,450.6641,203,460.6641,207,450.6641,203,454.6641" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="374.7773" y2="399.1797"/><polygon fill="#A80036" points="199,389.1797,203,399.1797,207,389.1797,203,393.1797" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="266.5" x2="307.5" y1="362.7773" y2="362.7773"/><polygon fill="#A80036" points="303.5,430.6641,307.5,440.6641,311.5,430.6641,307.5,434.6641" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="307.5" x2="307.5" y1="362.7773" y2="502.6641"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="307.5" x2="203" y1="502.6641" y2="502.6641"/><line style="stroke: #A80036; stroke-wi dth: 1.5;" x1="203" x2="203" y1="502.6641" y2="522.6641"/><polygon fill="#A80036" points="199,512.6641,203,522.6641,207,512.6641,203,516.6641" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="330.7773" y2="350.7773"/><polygon fill="#A80036" points="199,340.7773,203,350.7773,207,340.7773,203,344.7773" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="659.0039" y2="686.5195"/><polygon fill="#A80036" points="199,676.5195,203,686.5195,207,676.5195,203,680.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="600.6328" y2="625.0352"/><polygon fill="#A80036" points="199,615.0352,203,625.0352,207,615.0352,203,619.0352" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="270" x2="307.5" y1="588.6328" y2="588.6328"/><polygon fill="#A80036" point s="303.5,656.5195,307.5,666.5195,311.5,656.5195,307.5,660.5195" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="307.5" x2="307.5" y1="588.6328" y2="728.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="307.5" x2="203" y1="728.5195" y2="728.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="728.5195" y2="748.5195"/><polygon fill="#A80036" points="199,738.5195,203,748.5195,207,738.5195,203,742.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="556.6328" y2="576.6328"/><polygon fill="#A80036" points="199,566.6328,203,576.6328,207,566.6328,203,570.6328" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="105" x2="95" y1="760.5195" y2="760.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="95" x2="95" y1="760.5195" y2="782.5195"/><polygon fill="#A80036" points="91,772.5195 ,95,782.5195,99,772.5195,95,776.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="301" x2="311" y1="760.5195" y2="760.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="311" x2="311" y1="760.5195" y2="782.5195"/><polygon fill="#A80036" points="307,772.5195,311,782.5195,315,772.5195,311,776.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="95" x2="95" y1="816.4883" y2="834.4883"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="95" x2="191" y1="834.4883" y2="834.4883"/><polygon fill="#A80036" points="181,830.4883,191,834.4883,181,838.4883,185,834.4883" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="311" x2="311" y1="816.4883" y2="834.4883"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="311" x2="215" y1="834.4883" y2="834.4883"/><polygon fill="#A80036" points="225,830.4883,215,834.4883,225,838.4883,221, 834.4883" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="846.4883" y2="866.4883"/><polygon fill="#A80036" points="199,856.4883,203,866.4883,207,856.4883,203,860.4883" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="1002.8281" y2="1030.3438"/><polygon fill="#A80036" points="199,1020.3438,203,1030.3438,207,1020.3438,203,1024.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="944.457" y2="968.8594"/><polygon fill="#A80036" points="199,958.8594,203,968.8594,207,958.8594,203,962.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="366.5" x2="402" y1="932.457" y2="932.457"/><polygon fill="#A80036" points="398,1000.3438,402,1010.3438,406,1000.3438,402,1004.3438" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80 036; stroke-width: 1.5;" x1="402" x2="402" y1="932.457" y2="1072.3438"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="402" x2="203" y1="1072.3438" y2="1072.3438"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="1072.3438" y2="1092.3438"/><polygon fill="#A80036" points="199,1082.3438,203,1092.3438,207,1082.3438,203,1086.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="900.457" y2="920.457"/><polygon fill="#A80036" points="199,910.457,203,920.457,207,910.457,203,914.457" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="1126.3125" y2="1146.3125"/><polygon fill="#A80036" points="199,1136.3125,203,1146.3125,207,1136.3125,203,1140.3125" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="1180.2813" y2="1200.2813"/><polygon fill="#A80036" points="199,1190 .2813,203,1200.2813,207,1190.2813,203,1194.2813" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203" x2="203" y1="1234.25" y2="1254.25"/><polygon fill="#A80036" points="199,1244.25,203,1254.25,207,1244.25,203,1248.25" style="stroke: #A80036; stroke-width: 1.0;"/><!-- +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1285px" preserveAspectRatio="none" style="width:754px;height:1285px;" version="1.1" viewBox="0 0 754 1285" width="754px" zoomAndPan="magnify"><defs><filter height="300%" id="f1dflwv7yky46f" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="730" x="12" y="26.708">Activity diagram sbws results exclussion and aggregation (V3BWLine.from_results)</text><ellipse cx="391.25" cy="40.9531" fill="#000000 " filter="url(#f1dflwv7yky46f)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="120" x="331.25" y="70.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="100" x="341.25" y="92.0918">success_results</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="189" x="296.75" y="173.3242"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="169" x="306.75" y="194.4629">return (, exclusion_reason)</text><ellipse cx="391.25" cy="244.8086" fill="none" filter="url(#f1dflwv7yky46f)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="391.75" cy="245.3086" fill="#000000" filter="url(#f1dflwv7yky46f)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f1dflwv7yky46f)" points="330.75,124.9219,451.75,124.9219,463.75,136.9219,451.75,148.9219,330.75,148.9219,318.75,136.9219,330.75,124.9219" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="395.25" y="159.1323">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="121" x="330.75" y="140.73">not success_results?</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="100" x="341.25" y="296.8086"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="80" x="351.25" y="317.9473">results_away</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1 .5;" width="189" x="296.75" y="399.1797"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="169" x="306.75" y="420.3184">return (, exclusion_reason)</text><ellipse cx="391.25" cy="470.6641" fill="none" filter="url(#f1dflwv7yky46f)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="391.75" cy="471.1641" fill="#000000" filter="url(#f1dflwv7yky46f)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f1dflwv7yky46f)" points="339.75,350.7773,442.75,350.7773,454.75,362.7773,442.75,374.7773,339.75,374.7773,327.75,362.7773,339.75,350.7773" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="395.25" y="384.9878">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="103" x="339.75" y="366.5854">not results_away ?</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="110" x="336.25" y="522.6641"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="90" x="346.25" y="543.8027">results_recent</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="189" x="296.75" y="625.0352"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="169" x="306.75" y="646.1738">return (, exclusion_reason)</text><ellipse cx="391.25" cy="696.5195" fill="none" filter="url(#f1dflwv7yky46f)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="391.75" cy="697.0195" fill="#000000" filter="url(#f1dflwv7yky46f)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f1dflwv7yky46f)" p oints="336.25,576.6328,446.25,576.6328,458.25,588.6328,446.25,600.6328,336.25,600.6328,324.25,588.6328,336.25,576.6328" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="395.25" y="610.8433">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="110" x="336.25" y="592.4409">not results_recent?</text><polygon fill="#FEFECE" filter="url(#f1dflwv7yky46f)" points="305.25,748.5195,477.25,748.5195,489.25,760.5195,477.25,772.5195,305.25,772.5195,293.25,760.5195,305.25,748.5195" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="172" x="305.25" y="764.3276">node_id in router_statuses_d?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="273.25" y="757.9253">yes</t ext><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="489.25" y="757.9253">no</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="293" x="102" y="782.5195"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="273" x="112" y="803.6582">consensus_bandwidth from router statuses</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="238" x="415" y="782.5195"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="218" x="425" y="803.6582">consensus_bandwidth from results</text><polygon fill="#FEFECE" filter="url(#f1dflwv7yky46f)" points="391.25,822.4883,403.25,834.4883,391.25,846.4883,379.25,834.4883,391.25,822.4883" style="stroke: #A80036; stro ke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="72" x="355.25" y="866.4883"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="52" x="365.25" y="887.627">obs_last</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="282" x="250.25" y="968.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="262" x="260.25" y="989.998">return(cls(node_id, 1), "no_observed_bw")</text><ellipse cx="391.25" cy="1040.3438" fill="none" filter="url(#f1dflwv7yky46f)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="391.75" cy="1040.8438" fill="#000000" filter="url(#f1dflwv7yky46f)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f1 dflwv7yky46f)" points="340.75,920.457,441.75,920.457,453.75,932.457,441.75,944.457,340.75,944.457,328.75,932.457,340.75,920.457" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="395.25" y="954.6675">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="340.75" y="936.2651">obs_last is None?</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="37" x="372.75" y="1092.3438"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="17" x="382.75" y="1113.4824">bw</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="86" x="348.25" y="1146.3125"/><text fill="#000000" font-family="sans-se rif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="66" x="358.25" y="1167.4512">kwargs[...]</text><rect fill="#FEFECE" filter="url(#f1dflwv7yky46f)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="252" x="265.25" y="1200.2813"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="232" x="275.25" y="1221.4199">return (node_id, bw, **kwargs), None</text><ellipse cx="391.25" cy="1264.25" fill="none" filter="url(#f1dflwv7yky46f)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="391.75" cy="1264.75" fill="#000000" filter="url(#f1dflwv7yky46f)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="50.9531" y2="70.9531"/><polygon fill="#A80036" points="387.25,60.9531,391.25,70.9531,395.25,60.9531,391.25,64.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A8003 6; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="207.293" y2="234.8086"/><polygon fill="#A80036" points="387.25,224.8086,391.25,234.8086,395.25,224.8086,391.25,228.8086" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="148.9219" y2="173.3242"/><polygon fill="#A80036" points="387.25,163.3242,391.25,173.3242,395.25,163.3242,391.25,167.3242" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="463.75" x2="495.75" y1="136.9219" y2="136.9219"/><polygon fill="#A80036" points="491.75,204.8086,495.75,214.8086,499.75,204.8086,495.75,208.8086" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495.75" x2="495.75" y1="136.9219" y2="276.8086"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495.75" x2="391.25" y1="276.8086" y2="276.8086"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="276.80 86" y2="296.8086"/><polygon fill="#A80036" points="387.25,286.8086,391.25,296.8086,395.25,286.8086,391.25,290.8086" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="104.9219" y2="124.9219"/><polygon fill="#A80036" points="387.25,114.9219,391.25,124.9219,395.25,114.9219,391.25,118.9219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="433.1484" y2="460.6641"/><polygon fill="#A80036" points="387.25,450.6641,391.25,460.6641,395.25,450.6641,391.25,454.6641" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="374.7773" y2="399.1797"/><polygon fill="#A80036" points="387.25,389.1797,391.25,399.1797,395.25,389.1797,391.25,393.1797" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.75" x2="495.75" y1="362.7773" y2="362.7773" /><polygon fill="#A80036" points="491.75,430.6641,495.75,440.6641,499.75,430.6641,495.75,434.6641" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495.75" x2="495.75" y1="362.7773" y2="502.6641"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495.75" x2="391.25" y1="502.6641" y2="502.6641"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="502.6641" y2="522.6641"/><polygon fill="#A80036" points="387.25,512.6641,391.25,522.6641,395.25,512.6641,391.25,516.6641" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="330.7773" y2="350.7773"/><polygon fill="#A80036" points="387.25,340.7773,391.25,350.7773,395.25,340.7773,391.25,344.7773" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="659.0039" y2="686.5195"/><polygon fill="#A80036" points="387.25,676.5195,391.25 ,686.5195,395.25,676.5195,391.25,680.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="600.6328" y2="625.0352"/><polygon fill="#A80036" points="387.25,615.0352,391.25,625.0352,395.25,615.0352,391.25,619.0352" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="458.25" x2="495.75" y1="588.6328" y2="588.6328"/><polygon fill="#A80036" points="491.75,656.5195,495.75,666.5195,499.75,656.5195,495.75,660.5195" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495.75" x2="495.75" y1="588.6328" y2="728.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495.75" x2="391.25" y1="728.5195" y2="728.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="728.5195" y2="748.5195"/><polygon fill="#A80036" points="387.25,738.5195,391.25,748.5195,395.25,738.5195,391.25,742.5195" style="stroke : #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="556.6328" y2="576.6328"/><polygon fill="#A80036" points="387.25,566.6328,391.25,576.6328,395.25,566.6328,391.25,570.6328" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="293.25" x2="248.5" y1="760.5195" y2="760.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="248.5" x2="248.5" y1="760.5195" y2="782.5195"/><polygon fill="#A80036" points="244.5,772.5195,248.5,782.5195,252.5,772.5195,248.5,776.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="489.25" x2="534" y1="760.5195" y2="760.5195"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="534" x2="534" y1="760.5195" y2="782.5195"/><polygon fill="#A80036" points="530,772.5195,534,782.5195,538,772.5195,534,776.5195" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1 ="248.5" x2="248.5" y1="816.4883" y2="834.4883"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="248.5" x2="379.25" y1="834.4883" y2="834.4883"/><polygon fill="#A80036" points="369.25,830.4883,379.25,834.4883,369.25,838.4883,373.25,834.4883" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="534" x2="534" y1="816.4883" y2="834.4883"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="534" x2="403.25" y1="834.4883" y2="834.4883"/><polygon fill="#A80036" points="413.25,830.4883,403.25,834.4883,413.25,838.4883,409.25,834.4883" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="846.4883" y2="866.4883"/><polygon fill="#A80036" points="387.25,856.4883,391.25,866.4883,395.25,856.4883,391.25,860.4883" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="1002.8281" y2="1030.3438"/><polygon fill=" #A80036" points="387.25,1020.3438,391.25,1030.3438,395.25,1020.3438,391.25,1024.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="944.457" y2="968.8594"/><polygon fill="#A80036" points="387.25,958.8594,391.25,968.8594,395.25,958.8594,391.25,962.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="453.75" x2="542.25" y1="932.457" y2="932.457"/><polygon fill="#A80036" points="538.25,1000.3438,542.25,1010.3438,546.25,1000.3438,542.25,1004.3438" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="542.25" x2="542.25" y1="932.457" y2="1072.3438"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="542.25" x2="391.25" y1="1072.3438" y2="1072.3438"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="1072.3438" y2="1092.3438"/><polygon fill="#A80036" points="387.25,1082.3438,391.25,1092.3 438,395.25,1082.3438,391.25,1086.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="900.457" y2="920.457"/><polygon fill="#A80036" points="387.25,910.457,391.25,920.457,395.25,910.457,391.25,914.457" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="1126.3125" y2="1146.3125"/><polygon fill="#A80036" points="387.25,1136.3125,391.25,1146.3125,395.25,1136.3125,391.25,1140.3125" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="1180.2813" y2="1200.2813"/><polygon fill="#A80036" points="387.25,1190.2813,391.25,1200.2813,395.25,1190.2813,391.25,1194.2813" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391.25" x2="391.25" y1="1234.25" y2="1254.25"/><polygon fill="#A80036" points="387.25,1244.25,391.25,1254.25,395.25,12 44.25,391.25,1248.25" style="stroke: #A80036; stroke-width: 1.0;"/><!-- @startuml
-title Activity diagram sbws V3BWLine.from_results +title Activity diagram sbws results exclussion and aggregation (V3BWLine.from_results)
start :success_results; @@ -20,13 +20,13 @@ if (not results_recent?) then (yes) stop endif if (node_id in router_statuses_d?) then (yes) - :consensus_bandwidth; + :consensus_bandwidth from router statuses; else (no) - :consensus_bandwidth; + :consensus_bandwidth from results; endif :obs_last; -if (obs_last is None and consensus_bandwidth is None?) then (yes) - :return(cls(node_id, 1), "no_consensus_no_observed_bw"); +if (obs_last is None?) then (yes) + :return(cls(node_id, 1), "no_observed_bw"); stop endif :bw; @@ -36,13 +36,13 @@ stop
@enduml
-PlantUML version 1.2018.13(Mon Nov 26 17:11:51 GMT 2018) +PlantUML version 1.2018.13(Mon Nov 26 17:11:51 UTC 2018) (GPL source distribution) Java Runtime: OpenJDK Runtime Environment JVM: OpenJDK 64-Bit Server VM -Java Version: 11.0.9.1+1-post-Debian-1deb10u2 +Java Version: 11.0.11+9-post-Debian-1deb10u1 Operating System: Linux -OS Version: 4.19.0-13-amd64 +OS Version: 4.19.0-16-amd64 Default Encoding: UTF-8 Language: en Country: US diff --git a/docs/source/images/activity_scaling_as_torflow.svg b/docs/source/images/activity_scaling_as_torflow.svg index 822bd75..cb1529d 100644 --- a/docs/source/images/activity_scaling_as_torflow.svg +++ b/docs/source/images/activity_scaling_as_torflow.svg @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1237px" preserveAspectRatio="none" style="width:483px;height:1237px;" version="1.1" viewBox="0 0 483 1237" width="483px" zoomAndPan="magnify"><defs><filter height="300%" id="fq8tw0sgtkabn" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="352" x="64.75" y="26.708">Activity diagram sbws bw_torflow_scale</text><ellipse cx="244.5" cy="40.9531" fill="#000000" filter="url(#fq8tw0sgtkabn)" rx="10" ry ="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="276" x="106.5" y="70.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="256" x="116.5" y="92.0918">mu = mean([l.bw_mean for l in bw_lines])</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="260" x="114.5" y="124.9219"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="240" x="124.5" y="146.0605">muf = mean([l.bw_filt for l in bw_lines])</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="95" x="197" y="178.8906"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="75" x="207" y="200.0293">sum_bw = 0</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="66" x="211.5" y="276.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="46" x="221.5" y="297.998">bw_obs</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="396" x="46.5" y="330.8281"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="376" x="56.5" y="351.9668">desc_bw = min(desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg)</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="370" x="59.5" y="384.7969"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength=" 350" x="69.5" y="405.9355">min_bandwidth = min(desc_bw, l.consensus_bandwidth)</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="213" x="138" y="438.7656"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="193" x="148" y="459.9043">ratio_stream = l.bw_mean / mu</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="247" x="121" y="492.7344"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="227" x="131" y="513.873">ratio_stream_filtered = l.bw_filt / muf</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="318" x="85.5" y="558.7695"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust ="spacingAndGlyphs" textLength="298" x="95.5" y="579.9082">ratio = max(ratio_stream, ratio_stream_filtered)</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="198" x="145.5" y="612.7383"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="178" x="155.5" y="633.877">l.bw = ratio * min_bandwidth</text><polygon fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" points="189.5,666.707,299.5,666.707,311.5,678.707,299.5,690.707,189.5,690.707,177.5,678.707,189.5,666.707" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="110" x="189.5" y="682.5151">router_statuses_d?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="157.5" y="676.1128">yes</text><text fill="#000000" font-family="sans-serif " font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="311.5" y="676.1128">no</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="121" x="87" y="749.1094"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="101" x="97" y="770.248">sum_bw += l.bw</text><polygon fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" points="58,700.707,237,700.707,249,712.707,237,724.707,58,724.707,46,712.707,58,700.707" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="151.5" y="734.9175">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="179" x="58" y="716.5151">l.node_id in router_statuses_d?</text><polygon fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" points="147.5,803.0781,159.5,815.078 1,147.5,827.0781,135.5,815.0781,147.5,803.0781" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="121" x="281" y="700.707"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="101" x="291" y="721.8457">sum_bw += l.bw</text><polygon fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" points="244.5,833.0781,256.5,845.0781,244.5,857.0781,232.5,845.0781,244.5,833.0781" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" points="196.5,232.8594,292.5,232.8594,304.5,244.8594,292.5,256.8594,196.5,256.8594,184.5,244.8594,196.5,232.8594" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="96" x="196.5" y="248.6675">for l in bw_lines?</text><rect fill="#FEFECE" filter="url(#fq8 tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="157" x="166" y="899.0781"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="137" x="176" y="920.2168">hlimit = sum_bw * cap</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="199" x="145" y="997.0469"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="179" x="155" y="1018.1855">bw_scaled = min(hlimit, l.bw)</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="402" x="43.5" y="1066.0156"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="382" x="53.5" y="1087.1543">l.bw = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig)</text><polygon fil l="#FEFECE" filter="url(#fq8tw0sgtkabn)" points="196.5,953.0469,292.5,953.0469,304.5,965.0469,292.5,977.0469,196.5,977.0469,184.5,965.0469,196.5,953.0469" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="96" x="196.5" y="968.855">for l in bw_lines?</text><rect fill="#FEFECE" filter="url(#fq8tw0sgtkabn)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="423" x="33" y="1141.9844"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="403" x="43" y="1163.123">return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse)</text><ellipse cx="244.5" cy="1205.9531" fill="none" filter="url(#fq8tw0sgtkabn)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="245" cy="1206.4531" fill="#000000" filter="url(#fq8tw0sgtkabn)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="50.9531" y2="70.9531"/><polygon fill="#A80036" points="240.5,60.9531,244.5,70.9531,248.5,60.9531,244.5,64.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="104.9219" y2="124.9219"/><polygon fill="#A80036" points="240.5,114.9219,244.5,124.9219,248.5,114.9219,244.5,118.9219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="158.8906" y2="178.8906"/><polygon fill="#A80036" points="240.5,168.8906,244.5,178.8906,248.5,168.8906,244.5,172.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="310.8281" y2="330.8281"/><polygon fill="#A80036" points="240.5,320.8281,244.5,330.8281,248.5,320.8281,244.5,324.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1= "244.5" x2="244.5" y1="364.7969" y2="384.7969"/><polygon fill="#A80036" points="240.5,374.7969,244.5,384.7969,248.5,374.7969,244.5,378.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="418.7656" y2="438.7656"/><polygon fill="#A80036" points="240.5,428.7656,244.5,438.7656,248.5,428.7656,244.5,432.7656" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="472.7344" y2="492.7344"/><polygon fill="#A80036" points="240.5,482.7344,244.5,492.7344,248.5,482.7344,244.5,486.7344" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="526.7031" y2="558.7695"/><polygon fill="#A80036" points="240.5,548.7695,244.5,558.7695,248.5,548.7695,244.5,552.7695" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="592.7383" y2="612. 7383"/><polygon fill="#A80036" points="240.5,602.7383,244.5,612.7383,248.5,602.7383,244.5,606.7383" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="724.707" y2="749.1094"/><polygon fill="#A80036" points="143.5,739.1094,147.5,749.1094,151.5,739.1094,147.5,743.1094" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="249" x2="261" y1="712.707" y2="712.707"/><polygon fill="#A80036" points="257,756.0938,261,766.0938,265,756.0938,261,760.0938" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="261" x2="261" y1="712.707" y2="815.0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="261" x2="159.5" y1="815.0781" y2="815.0781"/><polygon fill="#A80036" points="169.5,811.0781,159.5,815.0781,169.5,819.0781,165.5,815.0781" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="14 7.5" x2="147.5" y1="783.0781" y2="803.0781"/><polygon fill="#A80036" points="143.5,793.0781,147.5,803.0781,151.5,793.0781,147.5,797.0781" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="177.5" x2="147.5" y1="678.707" y2="678.707"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="678.707" y2="700.707"/><polygon fill="#A80036" points="143.5,690.707,147.5,700.707,151.5,690.707,147.5,694.707" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="311.5" x2="341.5" y1="678.707" y2="678.707"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="341.5" x2="341.5" y1="678.707" y2="700.707"/><polygon fill="#A80036" points="337.5,690.707,341.5,700.707,345.5,690.707,341.5,694.707" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="827.0781" y2="845.0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="232.5" y1="845.0781" y2="845.0781"/><polygon fill="#A80036" points="222.5,841.0781,232.5,845.0781,222.5,849.0781,226.5,845.0781" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="341.5" x2="341.5" y1="734.6758" y2="845.0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="341.5" x2="256.5" y1="845.0781" y2="845.0781"/><polygon fill="#A80036" points="266.5,841.0781,256.5,845.0781,266.5,849.0781,262.5,845.0781" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="646.707" y2="666.707"/><polygon fill="#A80036" points="240.5,656.707,244.5,666.707,248.5,656.707,244.5,660.707" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="256.8594" y2="276.8594"/><polygon fill="#A80036" points="240.5,266.8594,244.5,276.8594,248.5,266.8594,244.5,270.8594" style="stroke: #A80036; stroke-width: 1. 0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="857.0781" y2="867.0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="454.5" y1="867.0781" y2="867.0781"/><polygon fill="#A80036" points="450.5,550.7031,454.5,540.7031,458.5,550.7031,454.5,546.7031" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="454.5" y1="244.8594" y2="867.0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="304.5" y1="244.8594" y2="244.8594"/><polygon fill="#A80036" points="314.5,240.8594,304.5,244.8594,314.5,248.8594,310.5,244.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="184.5" x2="24" y1="244.8594" y2="244.8594"/><polygon fill="#A80036" points="20,536.7031,24,546.7031,28,536.7031,24,540.7031" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="24" x2="24" y1="244.8594" y2="879. 0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="24" x2="244.5" y1="879.0781" y2="879.0781"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="879.0781" y2="899.0781"/><polygon fill="#A80036" points="240.5,889.0781,244.5,899.0781,248.5,889.0781,244.5,893.0781" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="212.8594" y2="232.8594"/><polygon fill="#A80036" points="240.5,222.8594,244.5,232.8594,248.5,222.8594,244.5,226.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1031.0156" y2="1066.0156"/><polygon fill="#A80036" points="240.5,1056.0156,244.5,1066.0156,248.5,1056.0156,244.5,1060.0156" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="977.0469" y2="997.0469"/><polygon fill="#A80036" points="240.5,987.0469,244.5,997.0469,248.5, 987.0469,244.5,991.0469" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1099.9844" y2="1109.9844"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="457.5" y1="1109.9844" y2="1109.9844"/><polygon fill="#A80036" points="453.5,1046.5156,457.5,1036.5156,461.5,1046.5156,457.5,1042.5156" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="457.5" x2="457.5" y1="965.0469" y2="1109.9844"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="457.5" x2="304.5" y1="965.0469" y2="965.0469"/><polygon fill="#A80036" points="314.5,961.0469,304.5,965.0469,314.5,969.0469,310.5,965.0469" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="184.5" x2="31.5" y1="965.0469" y2="965.0469"/><polygon fill="#A80036" points="27.5,1032.5156,31.5,1042.5156,35.5,1032.5156,31.5,1036.5156" style="stroke: #A80036; stroke-width: 1.5;"/> <line style="stroke: #A80036; stroke-width: 1.5;" x1="31.5" x2="31.5" y1="965.0469" y2="1121.9844"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="31.5" x2="244.5" y1="1121.9844" y2="1121.9844"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1121.9844" y2="1141.9844"/><polygon fill="#A80036" points="240.5,1131.9844,244.5,1141.9844,248.5,1131.9844,244.5,1135.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="933.0469" y2="953.0469"/><polygon fill="#A80036" points="240.5,943.0469,244.5,953.0469,248.5,943.0469,244.5,947.0469" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1175.9531" y2="1195.9531"/><polygon fill="#A80036" points="240.5,1185.9531,244.5,1195.9531,248.5,1185.9531,244.5,1189.9531" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#888888" font-family="sans-serif" font-size="10" lengt hAdjust="spacingAndGlyphs" textLength="119" x="181.25" y="1224.2354">last updated 2021-01-08</text><!-- +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1171px" preserveAspectRatio="none" style="width:483px;height:1171px;" version="1.1" viewBox="0 0 483 1171" width="483px" zoomAndPan="magnify"><defs><filter height="300%" id="fufbnejl6losm" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="352" x="64.75" y="26.708">Activity diagram sbws bw_torflow_scale</text><ellipse cx="244.5" cy="40.9531" fill="#000000" filter="url(#fufbnejl6losm)" rx="10" ry ="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="276" x="106.5" y="70.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="256" x="116.5" y="92.0918">mu = mean([l.bw_mean for l in bw_lines])</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="260" x="114.5" y="124.9219"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="240" x="124.5" y="146.0605">muf = mean([l.bw_filt for l in bw_lines])</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="95" x="197" y="178.8906"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="75" x="207" y="200.0293">sum_bw = 0</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="66" x="211.5" y="276.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="46" x="221.5" y="297.998">bw_obs</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="396" x="46.5" y="330.8281"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="376" x="56.5" y="351.9668">desc_bw = min(desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg)</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="213" x="138" y="384.7969"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="1 93" x="148" y="405.9355">ratio_stream = l.bw_mean / mu</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="247" x="121" y="438.7656"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="227" x="131" y="459.9043">ratio_stream_filtered = l.bw_filt / muf</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="318" x="85.5" y="492.7344"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="298" x="95.5" y="513.873">ratio = max(ratio_stream, ratio_stream_filtered)</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="158" x="165.5" y="546.7031"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust=" spacingAndGlyphs" textLength="138" x="175.5" y="567.8418">l.bw = ratio * desc_bw</text><polygon fill="#FEFECE" filter="url(#fufbnejl6losm)" points="189.5,600.6719,299.5,600.6719,311.5,612.6719,299.5,624.6719,189.5,624.6719,177.5,612.6719,189.5,600.6719" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="110" x="189.5" y="616.48">router_statuses_d?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="157.5" y="610.0776">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="311.5" y="610.0776">no</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="121" x="87" y="683.0742"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" te xtLength="101" x="97" y="704.2129">sum_bw += l.bw</text><polygon fill="#FEFECE" filter="url(#fufbnejl6losm)" points="58,634.6719,237,634.6719,249,646.6719,237,658.6719,58,658.6719,46,646.6719,58,634.6719" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="151.5" y="668.8823">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="179" x="58" y="650.48">l.node_id in router_statuses_d?</text><polygon fill="#FEFECE" filter="url(#fufbnejl6losm)" points="147.5,737.043,159.5,749.043,147.5,761.043,135.5,749.043,147.5,737.043" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="121" x="281" y="634.6719"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" text Length="101" x="291" y="655.8105">sum_bw += l.bw</text><polygon fill="#FEFECE" filter="url(#fufbnejl6losm)" points="244.5,767.043,256.5,779.043,244.5,791.043,232.5,779.043,244.5,767.043" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#fufbnejl6losm)" points="196.5,232.8594,292.5,232.8594,304.5,244.8594,292.5,256.8594,196.5,256.8594,184.5,244.8594,196.5,232.8594" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="96" x="196.5" y="248.6675">for l in bw_lines?</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="157" x="166" y="833.043"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="137" x="176" y="854.1816">hlimit = sum_bw * cap</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12 .5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="199" x="145" y="931.0117"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="179" x="155" y="952.1504">bw_scaled = min(hlimit, l.bw)</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="402" x="43.5" y="999.9805"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="382" x="53.5" y="1021.1191">l.bw = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig)</text><polygon fill="#FEFECE" filter="url(#fufbnejl6losm)" points="196.5,887.0117,292.5,887.0117,304.5,899.0117,292.5,911.0117,196.5,911.0117,184.5,899.0117,196.5,887.0117" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="96" x="196.5" y="902.8198">for l in bw_lines?</text><rect fill="#FEFECE" filter="url(#fufbnejl6losm)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="423" x="33" y="1075.9492"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="403" x="43" y="1097.0879">return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse)</text><ellipse cx="244.5" cy="1139.918" fill="none" filter="url(#fufbnejl6losm)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="245" cy="1140.418" fill="#000000" filter="url(#fufbnejl6losm)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="50.9531" y2="70.9531"/><polygon fill="#A80036" points="240.5,60.9531,244.5,70.9531,248.5,60.9531,244.5,64.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="104.9219" y2="124.9219"/><polygon fill="#A80036" points="24 0.5,114.9219,244.5,124.9219,248.5,114.9219,244.5,118.9219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="158.8906" y2="178.8906"/><polygon fill="#A80036" points="240.5,168.8906,244.5,178.8906,248.5,168.8906,244.5,172.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="310.8281" y2="330.8281"/><polygon fill="#A80036" points="240.5,320.8281,244.5,330.8281,248.5,320.8281,244.5,324.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="364.7969" y2="384.7969"/><polygon fill="#A80036" points="240.5,374.7969,244.5,384.7969,248.5,374.7969,244.5,378.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="418.7656" y2="438.7656"/><polygon fill="#A80036" points="240.5,428.7656,244.5,438.7656,248.5,428.765 6,244.5,432.7656" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="472.7344" y2="492.7344"/><polygon fill="#A80036" points="240.5,482.7344,244.5,492.7344,248.5,482.7344,244.5,486.7344" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="526.7031" y2="546.7031"/><polygon fill="#A80036" points="240.5,536.7031,244.5,546.7031,248.5,536.7031,244.5,540.7031" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="658.6719" y2="683.0742"/><polygon fill="#A80036" points="143.5,673.0742,147.5,683.0742,151.5,673.0742,147.5,677.0742" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="249" x2="261" y1="646.6719" y2="646.6719"/><polygon fill="#A80036" points="257,690.0586,261,700.0586,265,690.0586,261,694.0586" style="stroke: #A80036; stroke-widt h: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="261" x2="261" y1="646.6719" y2="749.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="261" x2="159.5" y1="749.043" y2="749.043"/><polygon fill="#A80036" points="169.5,745.043,159.5,749.043,169.5,753.043,165.5,749.043" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="717.043" y2="737.043"/><polygon fill="#A80036" points="143.5,727.043,147.5,737.043,151.5,727.043,147.5,731.043" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="177.5" x2="147.5" y1="612.6719" y2="612.6719"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="612.6719" y2="634.6719"/><polygon fill="#A80036" points="143.5,624.6719,147.5,634.6719,151.5,624.6719,147.5,628.6719" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="311.5" x2="341.5" y1="612.6719" y 2="612.6719"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="341.5" x2="341.5" y1="612.6719" y2="634.6719"/><polygon fill="#A80036" points="337.5,624.6719,341.5,634.6719,345.5,624.6719,341.5,628.6719" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="147.5" y1="761.043" y2="779.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="147.5" x2="232.5" y1="779.043" y2="779.043"/><polygon fill="#A80036" points="222.5,775.043,232.5,779.043,222.5,783.043,226.5,779.043" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="341.5" x2="341.5" y1="668.6406" y2="779.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="341.5" x2="256.5" y1="779.043" y2="779.043"/><polygon fill="#A80036" points="266.5,775.043,256.5,779.043,266.5,783.043,262.5,779.043" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="580 .6719" y2="600.6719"/><polygon fill="#A80036" points="240.5,590.6719,244.5,600.6719,248.5,590.6719,244.5,594.6719" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="256.8594" y2="276.8594"/><polygon fill="#A80036" points="240.5,266.8594,244.5,276.8594,248.5,266.8594,244.5,270.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="791.043" y2="801.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="454.5" y1="801.043" y2="801.043"/><polygon fill="#A80036" points="450.5,519.1523,454.5,509.1523,458.5,519.1523,454.5,515.1523" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="454.5" y1="244.8594" y2="801.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="304.5" y1="244.8594" y2="244.8594"/><polygon fill="#A80036" points="314.5,240.8594,304.5,244.8594 ,314.5,248.8594,310.5,244.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="184.5" x2="24" y1="244.8594" y2="244.8594"/><polygon fill="#A80036" points="20,505.1523,24,515.1523,28,505.1523,24,509.1523" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="24" x2="24" y1="244.8594" y2="813.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="24" x2="244.5" y1="813.043" y2="813.043"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="813.043" y2="833.043"/><polygon fill="#A80036" points="240.5,823.043,244.5,833.043,248.5,823.043,244.5,827.043" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="212.8594" y2="232.8594"/><polygon fill="#A80036" points="240.5,222.8594,244.5,232.8594,248.5,222.8594,244.5,226.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stro ke-width: 1.5;" x1="244.5" x2="244.5" y1="964.9805" y2="999.9805"/><polygon fill="#A80036" points="240.5,989.9805,244.5,999.9805,248.5,989.9805,244.5,993.9805" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="911.0117" y2="931.0117"/><polygon fill="#A80036" points="240.5,921.0117,244.5,931.0117,248.5,921.0117,244.5,925.0117" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1033.9492" y2="1043.9492"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="457.5" y1="1043.9492" y2="1043.9492"/><polygon fill="#A80036" points="453.5,980.4805,457.5,970.4805,461.5,980.4805,457.5,976.4805" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="457.5" x2="457.5" y1="899.0117" y2="1043.9492"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="457.5" x2="304.5" y1="899.0117" y2="899.0117"/><polyg on fill="#A80036" points="314.5,895.0117,304.5,899.0117,314.5,903.0117,310.5,899.0117" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="184.5" x2="31.5" y1="899.0117" y2="899.0117"/><polygon fill="#A80036" points="27.5,966.4805,31.5,976.4805,35.5,966.4805,31.5,970.4805" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="31.5" x2="31.5" y1="899.0117" y2="1055.9492"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="31.5" x2="244.5" y1="1055.9492" y2="1055.9492"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1055.9492" y2="1075.9492"/><polygon fill="#A80036" points="240.5,1065.9492,244.5,1075.9492,248.5,1065.9492,244.5,1069.9492" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="867.0117" y2="887.0117"/><polygon fill="#A80036" points="240.5,877.0117,244.5,887.0117,248.5,877.0117,244.5, 881.0117" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="244.5" x2="244.5" y1="1109.918" y2="1129.918"/><polygon fill="#A80036" points="240.5,1119.918,244.5,1129.918,248.5,1119.918,244.5,1123.918" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#888888" font-family="sans-serif" font-size="10" lengthAdjust="spacingAndGlyphs" textLength="119" x="181.25" y="1158.2002">last updated 2021-01-08</text><!-- @startuml
title Activity diagram sbws bw_torflow_scale @@ -10,11 +10,10 @@ start while (for l in bw_lines?) :bw_obs; :desc_bw = min(desc_bw_obs, l.desc_bw_bur, l.desc_bw_avg); - :min_bandwidth = min(desc_bw, l.consensus_bandwidth); :ratio_stream = l.bw_mean / mu; :ratio_stream_filtered = l.bw_filt / muf; :ratio = max(ratio_stream, ratio_stream_filtered); - :l.bw = ratio * min_bandwidth; + :l.bw = ratio * desc_bw; if (router_statuses_d?) then (yes) if (l.node_id in router_statuses_d?) then (yes) :sum_bw += l.bw; @@ -34,13 +33,13 @@ stop footer last updated 2021-01-08 @enduml
-PlantUML version 1.2018.13(Mon Nov 26 17:11:51 GMT 2018) +PlantUML version 1.2018.13(Mon Nov 26 17:11:51 UTC 2018) (GPL source distribution) Java Runtime: OpenJDK Runtime Environment JVM: OpenJDK 64-Bit Server VM -Java Version: 11.0.9.1+1-post-Debian-1deb10u2 +Java Version: 11.0.11+9-post-Debian-1deb10u1 Operating System: Linux -OS Version: 4.19.0-13-amd64 +OS Version: 4.19.0-16-amd64 Default Encoding: UTF-8 Language: en Country: US diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 2784620..dafd7cf 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -840,12 +840,12 @@ class V3BWLine(object): # If there is no last observed bandwidth, there won't be mean either. desc_bw_obs_last = cls.desc_bw_obs_last_from_results(results_recent)
- # Exclude also relays without consensus bandwidth nor observed - # bandwidth, since they can't be scaled - if desc_bw_obs_last is None and consensus_bandwidth is None: + # Exclude also relays without observed bandwidth, since they can't be + # scaled + if desc_bw_obs_last is None: # This reason is not counted, not added in the file, but it will # have vote = 0 - return (cls(node_id, 1), "no_consensus_no_observed_bw") + return (cls(node_id, 1), "no_observed_bw")
# For any line not excluded, do not include vote and unmeasured # KeyValues @@ -1379,10 +1379,6 @@ class V3BWFile(object): # Generators SHOULD NOT limit measured bandwidths based on # descriptors' bandwidth-observed, because that penalises new # relays. - # See https://gitlab.torproject.org/tpo/core/tor/-/issues/8494 - # If the observed bandwidth is None, it is not possible to - # calculate the minimum with the other descriptors. - # Only in this case, take the consensus bandwidth. # In the case that descriptor average or burst are None, # ignore them since it must be a bug in ``Resultdump``, already # logged in x_bw/bandwidth_x_from_results, but scale. @@ -1399,22 +1395,8 @@ class V3BWFile(object): desc_bw = min(desc_bw_obs, l.desc_bw_avg) else: desc_bw = desc_bw_obs - # If the relay is unmeasured and consensus bandwidth is None or - # 0, use the descriptor bandwidth - if ( - l.consensus_bandwidth_is_unmeasured - or not l.consensus_bandwidth - ): - min_bandwidth = desc_bw_obs - else: - min_bandwidth = min(desc_bw, l.consensus_bandwidth) - elif l.consensus_bandwidth is not None: - min_bandwidth = l.consensus_bandwidth else: - log.warning( - "Can not scale relay missing descriptor and" - " consensus bandwidth." - ) + log.warning("Can not scale relay missing descriptor.") continue
# Torflow's scaling @@ -1424,7 +1406,7 @@ class V3BWFile(object):
# Assign it to an attribute, so it's not lost before capping and # rounding - l.bw = ratio * min_bandwidth + l.bw = ratio * desc_bw
# If the consensus is available, sum only the bw for the relays # that are in the consensus diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py index 6841e8f..0a311a8 100644 --- a/tests/unit/lib/test_v3bwfile.py +++ b/tests/unit/lib/test_v3bwfile.py @@ -426,7 +426,7 @@ def test_torflow_scale_no_desc_bw_obs(datadir, conf, caplog): results = load_result_file(str(datadir.join("results_no_desc_bw_obs.txt"))) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, "", "", state_fpath) - assert v3bwfile.bw_lines[0].bw == 30 + assert v3bwfile.bw_lines[0].bw == 1
def test_torflow_scale_no_desc_bw_avg_obs(datadir, conf, caplog): @@ -436,7 +436,7 @@ def test_torflow_scale_no_desc_bw_avg_obs(datadir, conf, caplog): ) caplog.set_level(logging.DEBUG) v3bwfile = V3BWFile.from_results(results, "", "", state_fpath) - assert v3bwfile.bw_lines[0].bw == 30 + assert v3bwfile.bw_lines[0].bw == 1
def test_torflow_scale_no_consensus_bw(datadir, conf, caplog):