diff options
author | 2016-04-11 16:41:24 +0300 | |
---|---|---|
committer | 2016-04-11 16:41:24 +0300 | |
commit | 145a106abceaeb10f62dd40bc11010932f4b9576 (patch) | |
tree | 98ef8b22154e9db4bb964a49fdc425e9b0c64f4d /scripts/automation/trex_control_plane/stf | |
parent | f7d55aa327c0c6f721dee05f2f32a54d6ccf51cc (diff) | |
parent | af49c70aaaecb897c7d3b4bddb18f504d32b0546 (diff) |
Merge remove old code
Diffstat (limited to 'scripts/automation/trex_control_plane/stf')
-rwxr-xr-x | scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py index 074d9060..9ca13e17 100755 --- a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py +++ b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py @@ -1224,13 +1224,12 @@ class CTRexResult(object): continue hist_last_keys = deque([res['histogram'][-1]['key']], maxlen = 2) sum_high = 0.0 - - for i, elem in enumerate(reversed(res['histogram'])): + for elem in reversed(res['histogram']): sum_high += elem['val'] hist_last_keys.append(elem['key']) if sum_high / res['cnt'] >= filtered_latency_amount: break - result[max_port] = sum(hist_last_keys) / len(hist_last_keys) + result[max_port] = (hist_last_keys[0] + hist_last_keys[-1]) / 2 else: return {} return result |