commit ae74288f39c0b3f7ebff1d3e9135b85759bfe044 Author: teor teor@torproject.org Date: Thu Nov 15 10:59:35 2018 +1000
fixup! Round bandwidths to 2 significant digits by default --- sbws/core/generate.py | 4 ++-- sbws/lib/v3bwfile.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sbws/core/generate.py b/sbws/core/generate.py index 1913be7..674956f 100644 --- a/sbws/core/generate.py +++ b/sbws/core/generate.py @@ -1,8 +1,8 @@ from math import ceil
from sbws.globals import (fail_hard, SBWS_SCALE_CONSTANT, TORFLOW_SCALING, - SBWS_SCALING, TORFLOW_BW_MARGIN, TORFLOW_ROUNDING, - PROP276_ROUND_DIG, DAY_SECS, NUM_MIN_RESULTS) + SBWS_SCALING, TORFLOW_BW_MARGIN, PROP276_ROUND_DIG, + DAY_SECS, NUM_MIN_RESULTS) from sbws.lib.v3bwfile import V3BWFile from sbws.lib.resultdump import load_recent_results_in_datadir from argparse import ArgumentDefaultsHelpFormatter diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index c9ab259..ffc15a1 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -58,7 +58,7 @@ BW_KEYVALUES_INT = ['bw', 'rtt', 'success', 'error_stream', BW_KEYVALUES = BW_KEYVALUES_BASIC + BW_KEYVALUES_EXTRA
-def round_sig_dig(n, digits=TORFLOW_ROUND_DIG): +def round_sig_dig(n, digits=PROP276_ROUND_DIG): """Round n to 'digits' significant digits in front of the decimal point. Results less than or equal to 1 are rounded to 1. Returns an integer.