Unverified Commit ae74288f authored by teor's avatar teor
Browse files

fixup! Round bandwidths to 2 significant digits by default

parent 2b87682b
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
......
......@@ -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.
......
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