summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/hltapi_playground.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-03-14 11:14:13 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-03-14 11:14:13 +0200
commite07322a708dabf6ba50abc32e7c5cc6f6491ba32 (patch)
tree4936886525da55784b6db8a7eefdb15cc1a8d286 /scripts/automation/regression/hltapi_playground.py
parentd935f8e440051b703175ea47077d51873f4d9504 (diff)
regression: stl speedup
Diffstat (limited to 'scripts/automation/regression/hltapi_playground.py')
-rwxr-xr-xscripts/automation/regression/hltapi_playground.py34
1 files changed, 28 insertions, 6 deletions
diff --git a/scripts/automation/regression/hltapi_playground.py b/scripts/automation/regression/hltapi_playground.py
index 793b0282..b790fe25 100755
--- a/scripts/automation/regression/hltapi_playground.py
+++ b/scripts/automation/regression/hltapi_playground.py
@@ -55,12 +55,34 @@ if __name__ == "__main__":
port_handle = res['port_handle']
print('Connected, got port handles %s' % port_handle)
ports_streams_dict = CStreamsPerPort()
-
- res = check_res(hlt_client.traffic_config(mode = 'create', l2_encap = 'ethernet_ii_vlan', rate_pps = 1,
- l3_protocol = 'ipv4',
- length_mode = 'imix', l3_length = 200,
- ipv6_dst_mode = 'decrement', ipv6_dst_count = 300, ipv6_dst_addr = 'fe80:0:0:0:0:0:0:000f',
- port_handle = port_handle, port_handle2 = port_handle[1], save_to_yaml = '/tmp/d1.yaml'))
+ print hlt_client.traffic_control(action = 'poll')
+
+ print hlt_client.traffic_config(mode = 'create', l2_encap = 'ethernet_ii_vlan', rate_pps = 1,
+ l3_protocol = 'ipv4',
+ #length_mode = 'imix', l3_length = 200,
+ ipv6_dst_mode = 'decrement', ipv6_dst_count = 300, ipv6_dst_addr = 'fe80:0:0:0:0:0:0:000f',
+ port_handle = port_handle, port_handle2 = port_handle[1],
+ #save_to_yaml = '/tmp/d1.yaml',
+ #stream_id = 1,
+ )
+ print hlt_client.traffic_control(action = 'poll')
+ print hlt_client.traffic_control(action = 'run')
+ print hlt_client.traffic_control(action = 'poll')
+ wait_with_progress(2)
+ print hlt_client.traffic_control(action = 'poll')
+ print hlt_client.traffic_control(action = 'stop')
+ print hlt_client.traffic_control(action = 'poll')
+ print hlt_client.traffic_stats(mode = 'aggregate')
+ print hlt_client.traffic_control(action = 'clear_stats')
+ wait_with_progress(1)
+ print hlt_client.traffic_stats(mode = 'aggregate')
+
+ wait_with_progress(1)
+ print hlt_client.traffic_stats(mode = 'aggregate')
+ wait_with_progress(1)
+ print hlt_client.traffic_stats(mode = 'aggregate')
+ wait_with_progress(1)
+ print hlt_client.traffic_stats(mode = 'aggregate')
#print res
#print hlt_client._streams_history
#print hlt_client.trex_client._STLClient__get_all_streams(port_id = port_handle[0])