commit 4901c66a409e6185ff2c61895f5f0d6778059645 Merge: 5a88f74 2bd1e3d Author: juga0 juga@riseup.net Date: Sun Oct 28 07:27:24 2018 +0000
Merge branch 'ticket28197_change_keyvalues_names'
CHANGELOG.md | 5 +- sbws/lib/v3bwfile.py | 116 +++++++++++++++++++++------------------- sbws/util/timestamp.py | 2 +- tests/unit/lib/test_v3bwfile.py | 44 ++++++++------- 4 files changed, 89 insertions(+), 78 deletions(-)
diff --cc CHANGELOG.md index 6c6a008,796ac3d..9e15e01 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -19,14 -18,14 +19,15 @@@ and this project adheres to [Semantic V incorrect (#28041) - Stop removing results that are not away from some other X secs (#28103) - Use secs-away when provided instead of data_period (#28105) +- Disable measuring RTTs (#28159) + - Rename bandwidth file keyvalues (#28197)
## Added
- 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) diff --cc sbws/lib/v3bwfile.py index a572625,ab08810..0020c50 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@@ -300,19 -300,17 +300,19 @@@ class V3BWLine(object) results_recent = cls.results_recent_than(results_away, secs_recent) if not results_recent: return None - kwargs['desc_avg_bw_bs'] = \ + kwargs['desc_bw_avg'] = \ results_recent[-1].relay_average_bandwidth - kwargs['rtt'] = cls.rtt_from_results(results_recent) + rtt = cls.rtt_from_results(results_recent) + if rtt: + kwargs['rtt'] = rtt - bw = cls.bw_bs_median_from_results(results_recent) - kwargs['bw_bs_mean'] = cls.bw_bs_mean_from_results(results_recent) - kwargs['bw_bs_median'] = cls.bw_bs_median_from_results( + bw = cls.bw_median_from_results(results_recent) + kwargs['bw_mean'] = cls.bw_mean_from_results(results_recent) + kwargs['bw_median'] = cls.bw_median_from_results( results_recent) - kwargs['desc_obs_bw_bs_last'] = \ - cls.desc_obs_bw_bs_last_from_results(results_recent) - kwargs['desc_obs_bw_bs_mean'] = \ - cls.desc_obs_bw_bs_mean_from_results(results_recent) + kwargs['desc_bw_obs_last'] = \ + cls.desc_bw_obs_last_from_results(results_recent) + kwargs['desc_bw_obs_mean'] = \ + cls.desc_bw_obs_mean_from_results(results_recent) bwl = cls(node_id, bw, **kwargs) return bwl return None
tor-commits@lists.torproject.org