From 1b650efa968fa10a5fed1ecd8bd5ca5a7cb46660 Mon Sep 17 00:00:00 2001 From: Provoost Date: Mon, 1 Jul 2019 11:21:00 -0400 Subject: Cosmetic change when printing warnings Warnings can be printed in the following cases: - When not enough packets are taken into account for measuring packet latency accuracy. - When there us a potential network throughput issue, meaning the generator is generating more packets than the the NIC can handle - When the generator cannot generate the requested load If there are no warnings for a certain measurement, nothing gets printed, suppressing an empty line Change-Id: Iee07c12142e28dcc0ac406bfed7626731ab08f98 Signed-off-by: Luc Provoost --- VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'VNFs') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py index 159550ca..8964f2de 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py @@ -326,6 +326,7 @@ def run_flow_size_test(gensock,sutsock): minspeed = 0 while (maxspeed-minspeed > ACCURACY): attempts += 1 + endwarning ='' print(str(flow_number)+' flows: Measurement ongoing at speed: ' + str(round(speed,2)) + '% ',end='\r') sys.stdout.flush() # Start generating packets at requested speed (in % of a 10Gb/s link) @@ -361,7 +362,8 @@ def run_flow_size_test(gensock,sutsock): endlat_max = lat_max endabs_dropped = abs_dropped enddrop_rate = drop_rate - endwarning = '| |' + lat_warning + gen_warning + if lat_warning or gen_warning: + endwarning = '| | {:167.167} |'.format(lat_warning + gen_warning) success = True success_message='% | SUCCESS' else: -- cgit 1.2.3-korg