diff options
author | Miroslav Miklus <mmiklus@cisco.com> | 2016-09-14 14:51:33 +0200 |
---|---|---|
committer | Miroslav Miklus <mmiklus@cisco.com> | 2016-09-15 18:21:00 +0000 |
commit | 490256818796108eb9fc169fc477517c490c5d6a (patch) | |
tree | c3faa69daf3bf03c365ea5b1113fbad730abb1b1 /resources/libraries/python/DropRateSearch.py | |
parent | e9ce3e7fe123c7ed6847e7d615b0e963429b0298 (diff) |
CSIT-408 sub-NDR latency measurements
- measure latency at 10% and 50% of found NDR.
- fix the accuracy reported by T-REX (round to usec)
Change-Id: I9fe2b5f942cb816db6fd0bb4262b48b8da6dac2f
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
Diffstat (limited to 'resources/libraries/python/DropRateSearch.py')
-rw-r--r-- | resources/libraries/python/DropRateSearch.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/resources/libraries/python/DropRateSearch.py b/resources/libraries/python/DropRateSearch.py index b0f15b25db..6346125592 100644 --- a/resources/libraries/python/DropRateSearch.py +++ b/resources/libraries/python/DropRateSearch.py @@ -99,6 +99,15 @@ class DropRateSearch(object): self._search_result_rate = None @abstractmethod + def get_latency(self): + """Return min/avg/max latency. + + :return: Latency stats. + :rtype: list + """ + pass + + @abstractmethod def measure_loss(self, rate, frame_size, loss_acceptance, loss_acceptance_type, traffic_type): """Send traffic from TG and measure count of dropped frames. @@ -460,7 +469,7 @@ class DropRateSearch(object): raise Exception('Search FAILED') elif self._search_result in [SearchResults.SUCCESS, SearchResults.SUSPICIOUS]: - return self._search_result_rate, self._latency_stats + return self._search_result_rate, self.get_latency() def binary_search(self, b_min, b_max, traffic_type, skip_max_rate=False): """Binary search of rate with loss below acceptance criteria. |