Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CSIT-408 sub-NDR latency measurements
[csit.git]
/
resources
/
libraries
/
python
/
DropRateSearch.py
diff --git
a/resources/libraries/python/DropRateSearch.py
b/resources/libraries/python/DropRateSearch.py
index
b0f15b2
..
6346125
100644
(file)
--- a/
resources/libraries/python/DropRateSearch.py
+++ b/
resources/libraries/python/DropRateSearch.py
@@
-98,6
+98,15
@@
class DropRateSearch(object):
self._search_result = None
self._search_result_rate = None
self._search_result = None
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):
@abstractmethod
def measure_loss(self, rate, frame_size, loss_acceptance,
loss_acceptance_type, traffic_type):
@@
-460,7
+469,7
@@
class DropRateSearch(object):
raise Exception('Search FAILED')
elif self._search_result in [SearchResults.SUCCESS,
SearchResults.SUSPICIOUS]:
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.
def binary_search(self, b_min, b_max, traffic_type, skip_max_rate=False):
"""Binary search of rate with loss below acceptance criteria.