summaryrefslogtreecommitdiffstats
path: root/core/traffic_controller_rfc2544.py
diff options
context:
space:
mode:
authorbmichalo <bmichalo@redhat.com>2016-06-29 11:48:14 -0400
committerbmichalo <bmichalo@redhat.com>2016-06-30 09:55:57 -0400
commit65fe101fb2c040ef7c43fa719f0bc52d434489b6 (patch)
treed69c37c0d82af3d33be2a3810dda1ae6a3976797 /core/traffic_controller_rfc2544.py
parente04b1b9a22f93bb1783ff9e82486aec38dcb0efb (diff)
pkt_gen: Adding MoonGen traffic generator
Adds support for the MoonGen packet generator. The following traffic types are included: * RFC 2544 Throughput: Synchronous Interface * RFC 2544 Back 2 Back: Synchronous Interface * Continous Flow: Synchronous Interface JIRA: VSPERF-168 Sample log of execution can be found as an attachment within JIRA VSPERF-168 Change-Id: I5bb84290945f4ba41bc962370e643bbbeff0e486 Signed-off-by: bmichalo <bmichalo@redhat.com>
Diffstat (limited to 'core/traffic_controller_rfc2544.py')
-rw-r--r--core/traffic_controller_rfc2544.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py
index 2630101f..81e499cd 100644
--- a/core/traffic_controller_rfc2544.py
+++ b/core/traffic_controller_rfc2544.py
@@ -41,6 +41,7 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
self._traffic_started_call_count = 0
self._trials = int(get_test_param('rfc2544_trials', 1))
self._duration = int(get_test_param('duration', 30))
+ self._lossrate = float(get_test_param('lossrate', 0.0))
self._results = []
# If set, comma separated packet_sizes value from --test_params
@@ -100,13 +101,13 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
if traffic['traffic_type'] == 'back2back':
result = self._traffic_gen_class.send_rfc2544_back2back(
- traffic, trials=self._trials, duration=self._duration)
+ traffic, trials=self._trials, duration=self._duration, lossrate=self._lossrate)
elif traffic['traffic_type'] == 'continuous':
result = self._traffic_gen_class.send_cont_traffic(
traffic, duration=self._duration)
else:
result = self._traffic_gen_class.send_rfc2544_throughput(
- traffic, trials=self._trials, duration=self._duration)
+ traffic, trials=self._trials, duration=self._duration, lossrate=self._lossrate)
result = TrafficControllerRFC2544._append_results(result,
packet_size)