summaryrefslogtreecommitdiffstats
path: root/scripts/automation
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-04-26 05:32:09 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-04-26 05:32:09 +0300
commitcb55f42f183e631aec06ecb7d1ad953ad71b57d2 (patch)
tree222080b9482e7518faf17a92552b661fd90f3896 /scripts/automation
parent3d54c567d7bf2f75295e57cf8f903a7bf163b698 (diff)
stateful api: fix filter max latency
regression: fix bw_per_core at trex09 based on regression
Diffstat (limited to 'scripts/automation')
-rw-r--r--scripts/automation/regression/setups/trex09/benchmark.yaml14
-rwxr-xr-xscripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py30
2 files changed, 21 insertions, 23 deletions
diff --git a/scripts/automation/regression/setups/trex09/benchmark.yaml b/scripts/automation/regression/setups/trex09/benchmark.yaml
index 7de79c14..bb90acb0 100644
--- a/scripts/automation/regression/setups/trex09/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex09/benchmark.yaml
@@ -6,44 +6,44 @@
test_jumbo:
multiplier : 110
cores : 1
- bw_per_core : 962464
+ bw_per_core : 767198
test_routing_imix:
multiplier : 64
cores : 2
- bw_per_core : 55130
+ bw_per_core : 35889
test_routing_imix_64:
multiplier : 5000
cores : 2
- bw_per_core : 11699
+ bw_per_core : 10672
test_static_routing_imix_asymmetric:
multiplier : 32
cores : 1
- bw_per_core : 50561
+ bw_per_core : 52738
test_ipv6_simple:
multiplier : 64
cores : 4
- bw_per_core : 25948
+ bw_per_core : 22808
test_rx_check_http:
multiplier : 90000
cores : 2
rx_sample_rate : 32
- bw_per_core : 49464
+ bw_per_core : 46075
test_rx_check_sfr:
multiplier : 50
cores : 3
rx_sample_rate : 32
- bw_per_core : 20871
+ bw_per_core : 20469
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 f5887120..7f241620 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
@@ -1289,26 +1289,24 @@ class CTRexResult(object):
def __get_filtered_max_latency (src_dict, filtered_latency_amount = 0.001):
result = {}
for port, data in src_dict.items():
- if port.startswith('port-'):
- max_port = 'max-%s' % port[5:]
- res = data['hist']
- if not len(res['histogram']):
- result[max_port] = 0
- continue
- hist_last_keys = deque([res['histogram'][-1]['key']], maxlen = 2)
- sum_high = 0.0
- for elem in reversed(res['histogram']):
- sum_high += elem['val']
- hist_last_keys.append(elem['key'])
- if sum_high >= filtered_latency_amount * res['cnt']:
- break
- result[max_port] = (hist_last_keys[0] + hist_last_keys[-1]) / 2
- else:
- return {}
+ if not port.startswith('port-'):
+ continue
+ max_port = 'max-%s' % port[5:]
+ res = data['hist']
+ if not len(res['histogram']):
+ result[max_port] = 0
+ continue
+ sum_high = 0.0
+ for elem in reversed(res['histogram']):
+ sum_high += elem['val']
+ if sum_high >= filtered_latency_amount * res['cnt']:
+ result[max_port] = elem['key'] + int('5' + repr(elem['key'])[2:])
+ break
return result
+
if __name__ == "__main__":
pass