aboutsummaryrefslogtreecommitdiffstats
path: root/core/traffic_controller_rfc2544.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/traffic_controller_rfc2544.py')
-rw-r--r--core/traffic_controller_rfc2544.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py
index 020b4aec..2630101f 100644
--- a/core/traffic_controller_rfc2544.py
+++ b/core/traffic_controller_rfc2544.py
@@ -154,3 +154,16 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
"""IResult interface implementation.
"""
return self._results
+
+ def validate_send_traffic(self, result, traffic):
+ """Verify that send traffic has succeeded
+ """
+ if len(self._results):
+ if 'b2b_frames' in self._results[-1]:
+ return float(self._results[-1]['b2b_frames']) > 0
+ elif 'throughput_rx_fps' in self._results[-1]:
+ return float(self._results[-1]['throughput_rx_fps']) > 0
+ else:
+ return True
+ else:
+ return False