summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pedersen <michael.soelvkaer@gmail.com>2018-05-17 09:18:40 -0700
committerMichael Pedersen <michael.soelvkaer@gmail.com>2018-05-17 09:20:45 -0700
commit5aae8e338ab2a71e89c1a9b442c895c72685f585 (patch)
treef9123e17aeffd64d5edd28f2a4e5fe799c4046a0
parente17b4b5b35936c5032cbeb3ccf8efbbc4c59c686 (diff)
Add a configurable pause between runs during NDR/PDR binary search1.4.2
JIRA: NFVBENCH-93 Change-Id: I4328d51c934b62acba7b300426c25469dd69e598 Signed-off-by: Michael Pedersen <michael.soelvkaer@gmail.com>
-rwxr-xr-xnfvbench/cfg.default.yaml3
-rw-r--r--nfvbench/nfvbench.py1
-rwxr-xr-xnfvbench/traffic_client.py1
-rw-r--r--test/test_nfvbench.py1
4 files changed, 6 insertions, 0 deletions
diff --git a/nfvbench/cfg.default.yaml b/nfvbench/cfg.default.yaml
index da68571..2af6d63 100755
--- a/nfvbench/cfg.default.yaml
+++ b/nfvbench/cfg.default.yaml
@@ -359,6 +359,9 @@ duration_sec: 60
# Can be overridden by --interval
interval_sec: 10
+# Default pause between iterations of a binary search (NDR/PDR)
+pause_sec: 2
+
# NDR / PDR configuration
measurement:
# Drop rates represent the ratio of dropped packet to the total number of packets sent.
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py
index 1f80390..e0b5786 100644
--- a/nfvbench/nfvbench.py
+++ b/nfvbench/nfvbench.py
@@ -177,6 +177,7 @@ class NFVBench(object):
self.config.duration_sec = float(self.config.duration_sec)
self.config.interval_sec = float(self.config.interval_sec)
+ self.config.pause_sec = float(self.config.pause_sec)
# Get traffic generator profile config
if not self.config.generator_profile:
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index 188e076..ef68fe5 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -754,6 +754,7 @@ class TrafficClient(object):
time_elapsed_ratio = self.runner.time_elapsed() / self.run_config['duration_sec']
if time_elapsed_ratio >= 1:
self.cancel_traffic()
+ time.sleep(self.config.pause_sec)
self.interval_collector.reset()
# get stats from the run
diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py
index c45ccb3..4603ae1 100644
--- a/test/test_nfvbench.py
+++ b/test/test_nfvbench.py
@@ -623,6 +623,7 @@ def get_dummy_tg_config(chain_type, rate):
'no_arp': False,
'duration_sec': 1,
'interval_sec': 1,
+ 'pause_sec': 1,
'rate': rate,
'check_traffic_time_sec': 200,
'generic_poll_sec': 2,