X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FDropRateSearch.py;h=ceaebd57c393c642d709a2a2ee2431eb1c8e794d;hp=c25f34fcf695ec0dadfc67b03df28a06d3fbbf76;hb=c478afc5aec0161cc66e837c1ab919542b68ebbc;hpb=1739f04bbed020135f2bbf0ffcedf961fc1b5474 diff --git a/resources/libraries/python/DropRateSearch.py b/resources/libraries/python/DropRateSearch.py index c25f34fcf6..ceaebd57c3 100644 --- a/resources/libraries/python/DropRateSearch.py +++ b/resources/libraries/python/DropRateSearch.py @@ -320,14 +320,13 @@ class DropRateSearch(object): else: raise ValueError("Unknown search result type") - def linear_search(self, start_rate, traffic_type): """Linear search of rate with loss below acceptance criteria. :param start_rate: Initial rate. :param traffic_type: Traffic profile. :type start_rate: float - :param traffic_type: str + :type traffic_type: str :return: nothing """ @@ -350,7 +349,7 @@ class DropRateSearch(object): res = self._get_res_based_on_search_type(res) if self._search_linear_direction == SearchDirection.BOTTOM_UP: - # loss occured and it was above acceptance criteria + # loss occurred and it was above acceptance criteria if not res: # if this is first run then we didn't find drop rate if prev_rate is None: @@ -381,7 +380,7 @@ class DropRateSearch(object): raise RuntimeError("Unknown search result") elif self._search_linear_direction == SearchDirection.TOP_DOWN: - # loss occured, decrease rate + # loss occurred, decrease rate if not res: prev_rate = rate rate -= self._rate_linear_step @@ -464,7 +463,7 @@ class DropRateSearch(object): res = self._get_res_based_on_search_type(res) - # loss occured and it was above acceptance criteria + # loss occurred and it was above acceptance criteria if not res: self.binary_search(b_min, rate, traffic_type) # there was no loss / loss below acceptance criteria