X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fsearch%2FOptimizedSearchAlgorithm.py;h=f89acd56b2cc3d2649d25ae3e2441df4d1ae4572;hb=938a0c9cec6d2177e098653ad398372fb482c36f;hp=0d3eacc937e812e14c89bf624cdd602379c3c56c;hpb=a3d14e7cf128c5188a4e064042a64333ae64d191;p=csit.git diff --git a/resources/libraries/python/search/OptimizedSearchAlgorithm.py b/resources/libraries/python/search/OptimizedSearchAlgorithm.py index 0d3eacc937..f89acd56b2 100644 --- a/resources/libraries/python/search/OptimizedSearchAlgorithm.py +++ b/resources/libraries/python/search/OptimizedSearchAlgorithm.py @@ -73,7 +73,13 @@ class OptimizedSearchAlgorithm(AbstractSearchAlgorithm): or all of the following is true: Both bounds are valid, bound bounds are measured at the current phase trial duration, interval width is less than the width goal - for current phase.""" + for current phase. + + TODO: Reviwew and update this docstring according to rst docs. + TODO: Initial phase: Larger min width and search up on zero. + TODO: Support configurable number of Packet Loss Ratios. + TODO: Rename to MultipleDropRateSearch (or MultipleLossRatioSearch). + """ class ProgressState(object): """Structure containing data to be passed around in recursion.""" @@ -439,7 +445,7 @@ class OptimizedSearchAlgorithm(AbstractSearchAlgorithm): continue # If we are hitting maximum_transmit_rate, # it is still worth narrowing width, - # hoping large enough Df will happen. + # hoping large enough loss fraction will happen. # But if we are hitting the minimal rate (at current duration), # no additional measurement will help with that, # so we can stop narrowing in this phase. @@ -451,6 +457,7 @@ class OptimizedSearchAlgorithm(AbstractSearchAlgorithm): pdr_rel_width = 0.0 if max(ndr_rel_width, pdr_rel_width) > state.width_goal: # We have to narrow some width. + # TODO: Prefer NDR, it could invalidate PDR (not vice versa). if ndr_rel_width >= pdr_rel_width: new_tr = self.half_step_up(ndr_rel_width, ndr_lo.target_tr) logging.info("Bisecting for NDR at %s", new_tr) @@ -473,7 +480,7 @@ class OptimizedSearchAlgorithm(AbstractSearchAlgorithm): logging.info("re-measuring PDR lower bound") self._measure_and_update_state(state, pdr_lo.target_tr) continue - # Except when lower bounds have high Df, in that case + # Except when lower bounds have high loss fraction, in that case # we do not need to re-measure _upper_ bounds. if ndr_hi.duration < state.duration and ndr_rel_width > 0.0: logging.info("re-measuring NDR upper bound")