Cosmetic change when printing warnings 69/68169/2
authorProvoost <luc.provoost@intel.com>
Mon, 1 Jul 2019 15:21:00 +0000 (11:21 -0400)
committerLuc Provoost <luc.provoost@intel.com>
Mon, 1 Jul 2019 16:30:07 +0000 (12:30 -0400)
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 <luc.provoost@intel.com>
VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py

index 159550c..8964f2d 100755 (executable)
@@ -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: