Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Increase timeout for 'vpp restart' operations
[csit.git]
/
resources
/
libraries
/
python
/
DropRateSearch.py
diff --git
a/resources/libraries/python/DropRateSearch.py
b/resources/libraries/python/DropRateSearch.py
index
b0f15b2
..
aead532
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):
@@
-346,7
+355,7
@@
class DropRateSearch(object):
:rtype: boolean
"""
# Return False if not all elements of the iterable are True.
:rtype: boolean
"""
# Return False if not all elements of the iterable are True.
- return
not
all(res_list)
+ return all(res_list)
def _get_res_based_on_search_type(self, res_list):
"""Return result of search based on search evaluation type.
def _get_res_based_on_search_type(self, res_list):
"""Return result of search based on search evaluation 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.