aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/TrafficGenerator.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/TrafficGenerator.py')
-rw-r--r--resources/libraries/python/TrafficGenerator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index f6020299c5..489b44572b 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -147,6 +147,7 @@ class TrafficGenerator(AbstractMeasurer):
self.frame_size = None
self.traffic_profile = None
self.warmup_time = None
+ self.traffic_directions = None
@property
def node(self):
@@ -658,7 +659,7 @@ class TrafficGenerator(AbstractMeasurer):
duration = time.time() - self._start_time
self._start_time = None
if transmit_rate is None:
- transmit_rate = self._rate * (1.0 if self.uinidirection else 2.0)
+ transmit_rate = self._rate * self.traffic_directions
transmit_count = int(self.get_sent())
loss_count = int(self.get_loss())
measurement = ReceiveRateMeasurement(