diff options
author | 2016-05-29 13:10:31 +0300 | |
---|---|---|
committer | 2016-05-29 13:12:19 +0300 | |
commit | dad5f59181ad000c5e43d96037377d9f1ce2d57a (patch) | |
tree | 47b4fcd2b1601153fc164ffd3d5a299edf49378e /scripts/automation/trex_control_plane/stl/trex_stl_lib | |
parent | 285e051d05ba4a7b59d0b8aa658237150906e5cb (diff) | |
parent | b847ae93521380242ac976a1fb1b425648ce9fa2 (diff) |
merge fix for double barrier
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib')
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py | 6 | ||||
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py index 0f68d4a3..464869aa 100755 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py @@ -1529,11 +1529,11 @@ def get_TOS(user_kwargs, kwargs): TOS1 = set(['ip_precedence', 'ip_delay', 'ip_throughput', 'ip_reliability', 'ip_cost', 'ip_reserved']) TOS2 = set(['ip_dscp', 'ip_cu']) user_args = set(user_kwargs.keys()) - if user_args & TOS0.symmetric_difference(TOS1): + if user_args & (TOS1 - TOS0) and user_args & (TOS0 - TOS1): raise STLError('You have mixed %s and %s TOS parameters' % (TOS0, TOS1)) - if user_args & TOS0.symmetric_difference(TOS2): + if user_args & (TOS2 - TOS0) and user_args & (TOS0 - TOS2): raise STLError('You have mixed %s and %s TOS parameters' % (TOS0, TOS2)) - if user_args & TOS1.symmetric_difference(TOS2): + if user_args & (TOS2 - TOS1) and user_args & (TOS1 - TOS2): raise STLError('You have mixed %s and %s TOS parameters' % (TOS1, TOS2)) if user_args & (TOS0 - TOS1 - TOS2): return (kwargs['ip_precedence'] << 5) + (kwargs['ip_tos_field'] << 2) + kwargs['ip_mbz'] diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py index 6b34b11a..ee4bd1f9 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py @@ -1026,9 +1026,15 @@ class CLatencyStats(CTRexStats): if current_pg['latency']['h'] != "": output[int_pg_id]['latency']['average'] = current_pg['latency']['h']['s_avg'] output[int_pg_id]['latency']['total_max'] = current_pg['latency']['h']['max_usec'] - output[int_pg_id]['latency']['histogram'] = {elem['key']: elem['val'] for elem in current_pg['latency']['h']['histogram']} + output[int_pg_id]['latency']['histogram'] = {elem['key']: elem['val'] + for elem in current_pg['latency']['h']['histogram']} zero_count = current_pg['latency']['h']['cnt'] - current_pg['latency']['h']['high_cnt'] - output[int_pg_id]['latency']['histogram'][0] = zero_count + if zero_count != 0: + output[int_pg_id]['latency']['total_min'] = 1 + output[int_pg_id]['latency']['histogram'][0] = zero_count + else: + output[int_pg_id]['latency']['total_min'] = min(output[int_pg_id]['latency']['histogram'].keys()) + self.latest_stats = output return True |