summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/apidocs/index.rst2
-rw-r--r--docs/release/release-notes/index.rst2
-rw-r--r--docs/release/results/index.rst2
-rw-r--r--docs/testing/user/userguide/index.rst2
-rw-r--r--yardstick/benchmark/scenarios/networking/netutilization.py29
-rw-r--r--yardstick/network_services/traffic_profile/fixed.py3
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_trex.py2
7 files changed, 26 insertions, 16 deletions
diff --git a/docs/apidocs/index.rst b/docs/apidocs/index.rst
index 8bd407341..b7f49f536 100644
--- a/docs/apidocs/index.rst
+++ b/docs/apidocs/index.rst
@@ -1,3 +1,5 @@
+.. _yardstick-apidocs:
+
.. This work is licensed under a Creative Commons Attribution 4.0 International
.. License.
.. http://creativecommons.org/licenses/by/4.0
diff --git a/docs/release/release-notes/index.rst b/docs/release/release-notes/index.rst
index c9cadc539..11a508ca6 100644
--- a/docs/release/release-notes/index.rst
+++ b/docs/release/release-notes/index.rst
@@ -1,3 +1,5 @@
+.. _yardstick-releasenotes:
+
.. This work is licensed under a Creative Commons Attribution 4.0 International
.. License.
.. http://creativecommons.org/licenses/by/4.0
diff --git a/docs/release/results/index.rst b/docs/release/results/index.rst
index 2b67f1b22..0560152e0 100644
--- a/docs/release/results/index.rst
+++ b/docs/release/results/index.rst
@@ -1,3 +1,5 @@
+.. _yardstick-results:
+
.. This work is licensed under a Creative Commons Attribution 4.0 International
.. License.
.. http://creativecommons.org/licenses/by/4.0
diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst
index 1b963af61..75dcbcd82 100644
--- a/docs/testing/user/userguide/index.rst
+++ b/docs/testing/user/userguide/index.rst
@@ -1,3 +1,5 @@
+.. _yardstick-userguide:
+
.. This work is licensed under a Creative Commons Attribution 4.0 International
.. License.
.. http://creativecommons.org/licenses/by/4.0
diff --git a/yardstick/benchmark/scenarios/networking/netutilization.py b/yardstick/benchmark/scenarios/networking/netutilization.py
index 1ba6f1ec3..37da7f895 100644
--- a/yardstick/benchmark/scenarios/networking/netutilization.py
+++ b/yardstick/benchmark/scenarios/networking/netutilization.py
@@ -100,30 +100,22 @@ class NetUtilization(base.Scenario):
average = {}
time_marker = re.compile("^([0-9]+):([0-9]+):([0-9]+)$")
- ampm_marker = re.compile("(AM|PM)$")
# Parse network utilization stats
- for row in raw_result.split('\n'):
+ for row in raw_result.splitlines():
line = row.split()
if line and re.match(time_marker, line[0]):
- if re.match(ampm_marker, line[1]):
- del line[:2]
- if line[0] == 'IFACE':
- # header fields
- fields = line[1:]
- if len(fields) != NetUtilization.\
- NET_UTILIZATION_FIELD_SIZE:
- raise RuntimeError("network_utilization: unexpected\
- field size", fields)
- else:
- # value fields
+ try:
+ index = line.index('IFACE')
+ except ValueError:
+ del line[:index]
net_interface = line[0]
values = line[1:]
if values and len(values) == len(fields):
- temp_dict = dict(list(zip(fields, values)))
+ temp_dict = dict(zip(fields, values))
if net_interface not in maximum:
maximum[net_interface] = temp_dict
else:
@@ -144,6 +136,13 @@ class NetUtilization(base.Scenario):
else:
raise RuntimeError("network_utilization: parse error",
fields, line)
+ else:
+ del line[:index]
+ fields = line[1:]
+ if len(fields) != NetUtilization.\
+ NET_UTILIZATION_FIELD_SIZE:
+ raise RuntimeError("network_utilization: unexpected\
+ field size", fields)
elif line and line[0] == 'Average:':
del line[:1]
@@ -161,7 +160,7 @@ class NetUtilization(base.Scenario):
values = line[1:]
if values and len(values) == len(fields):
average[net_interface] = dict(
- list(zip(fields, values)))
+ zip(fields, values))
else:
raise RuntimeError("network_utilization average: \
parse error", fields, line)
diff --git a/yardstick/network_services/traffic_profile/fixed.py b/yardstick/network_services/traffic_profile/fixed.py
index a456c2bd7..ebc1e61f2 100644
--- a/yardstick/network_services/traffic_profile/fixed.py
+++ b/yardstick/network_services/traffic_profile/fixed.py
@@ -43,7 +43,8 @@ class FixedProfile(TrafficProfile):
self._create_stream(src_ip, dst_ip),
ports=[ports])
- traffic_generator.client.start(ports=traffic_generator.my_ports)
+ traffic_generator.client.start(ports=traffic_generator.my_ports,
+ force=True)
self.first_run = False
def _create_stream(self, src_ip, dst_ip):
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
index 2731476e0..1e751bfce 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_trex.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
@@ -31,6 +31,7 @@ from stl.trex_stl_lib.trex_stl_exceptions import STLError
LOG = logging.getLogger(__name__)
DURATION = 30
+WAIT_QUEUE = 1
TREX_SYNC_PORT = 4500
TREX_ASYNC_PORT = 4501
@@ -259,6 +260,7 @@ class TrexTrafficGen(GenericTrafficGen):
"tx_throughput_mbps": float(xe_value.get("tx_bps", 0.0)),
"in_packets": xe_value.get("ipackets", 0),
"out_packets": xe_value.get("opackets", 0)}
+ time.sleep(WAIT_QUEUE)
queue.put(samples)
self.client.disconnect()