From 074ae9732d06f962a65d91147b55abf86b42b6d9 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Wed, 8 Jan 2020 21:14:25 +0000 Subject: perf: QUIC transport hoststack test suite Change-Id: I73f4be7ea315c7a5dcce46e1bd3034bcb0a97ee2 Signed-off-by: Dave Wallace --- resources/libraries/python/HoststackUtil.py | 20 ++++++++++++++++---- resources/libraries/python/autogen/Regenerator.py | 14 +++++++------- 2 files changed, 23 insertions(+), 11 deletions(-) (limited to 'resources/libraries/python') diff --git a/resources/libraries/python/HoststackUtil.py b/resources/libraries/python/HoststackUtil.py index f95a6a6636..dde5cf60d0 100644 --- a/resources/libraries/python/HoststackUtil.py +++ b/resources/libraries/python/HoststackUtil.py @@ -44,6 +44,8 @@ class HoststackUtil(): f"socket-name {vpp_echo_attributes[u'vpp_api_socket']} " \ f"{vpp_echo_attributes[u'json_output']} " \ f"uri {proto}://{addr}/{port} " \ + f"nthreads {vpp_echo_attributes[u'nthreads']} " \ + f"mq-size {vpp_echo_attributes[u'mq_size']} " \ f"nclients {vpp_echo_attributes[u'nclients']} " \ f"quic-streams {vpp_echo_attributes[u'quic_streams']} " \ f"time {vpp_echo_attributes[u'time']} " \ @@ -299,10 +301,20 @@ class HoststackUtil(): raise RuntimeError(test_results) if program_stdout: bad_test_results = False - if program == u"vpp_echo" and u"JSON stats" not in program_stdout: - test_results += u"Invalid test data output!\n" - bad_test_results = True - test_results += program_stdout + if program[u"name"] == u"vpp_echo": + if u"JSON stats" in program_stdout: + test_results += program_stdout + # TODO: Decode vpp_echo output when JSON format is correct. + # json_start = program_stdout.find(u"{") + # vpp_echo_results = json.loads(program_stdout[json_start:]) + if u'"has_failed": "0"' not in program_stdout: + bad_test_results = True + else: + test_results += u"Invalid test data output!\n" + \ + program_stdout + bad_test_results = True + else: + test_results += program_stdout if bad_test_results: raise RuntimeError(test_results) else: diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py index 5b112f5a73..f065887da0 100644 --- a/resources/libraries/python/autogen/Regenerator.py +++ b/resources/libraries/python/autogen/Regenerator.py @@ -476,13 +476,13 @@ class Regenerator: u"streams": 10, u"bytes_str": u"1G"}, ] hoststack_quic_kwargs_list = [ - {u"frame_size": 0, u"phy_cores": 1, u"clients": 1, - u"streams": 1, u"bytes_str": u"100M"}, - {u"frame_size": 0, u"phy_cores": 1, u"clients": 1, - u"streams": 10, u"bytes_str": u"100M"}, - {u"frame_size": 0, u"phy_cores": 1, u"clients": 10, - u"streams": 1, u"bytes_str": u"100M"}, - {u"frame_size": 0, u"phy_cores": 1, u"clients": 10, + {u"phy_cores": 1, u"frame_size": 0, u"clients": 1, + u"streams": 1, u"bytes_str": u"10G"}, + {u"phy_cores": 1, u"frame_size": 0, u"clients": 1, + u"streams": 10, u"bytes_str": u"1G"}, + {u"phy_cores": 1, u"frame_size": 0, u"clients": 10, + u"streams": 1, u"bytes_str": u"1G"}, + {u"phy_cores": 1, u"frame_size": 0, u"clients": 10, u"streams": 10, u"bytes_str": u"100M"}, ] -- cgit 1.2.3-korg