bb6881ef7ba52fc2423462d16c188ccf9c038afc
[csit.git] / resources / libraries / robot / performance / performance_actions.robot
1 # Copyright (c) 2021 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Variables | resources/libraries/python/Constants.py
16 | Resource | resources/libraries/robot/performance/performance_utils.robot
17 |
18 | Documentation
19 | ... | Performance suite keywords - Actions related to performance tests.
20
21 *** Keywords ***
22 | Additional Statistics Action For bash-perf-stat
23 | | [Documentation]
24 | | ... | Additional Statistics Action for bash command "perf stat".
25 | |
26 | | Run Keyword If | ${extended_debug}==${True}
27 | | ... | Perf Stat On All DUTs | ${nodes} | cpu_list=${cpu_alloc_str}
28
29 | Additional Statistics Action For vpp-runtime
30 | | [Documentation]
31 | | ... | Additional Statistics Action for clear and show runtime counters with
32 | | ... | running traffic.
33 | |
34 | | ... | See documentation of the called keyword for required test variables.
35 | |
36 | | ${ppta} = | Get Packets Per Transaction Aggregated
37 | | ${ramp_up_duration} = | Get Ramp Up Duration
38 | | ${ramp_up_rate} = | Get Ramp Up Rate
39 | | ${runtime_duration} = | Get Runtime Duration
40 | | ${runtime_rate} = | Get Runtime Rate
41 | | ${traffic_directions} = | Get Traffic Directions
42 | | ${transaction_duration} = | Get Transaction Duration
43 | | ${transaction_scale} = | Get Transaction Scale
44 | | ${transaction_type} = | Get Transaction Type
45 | | ${use_latency} = | Get Use Latency
46 | | Send traffic on tg
47 | | ... | duration=${-1}
48 | | ... | rate=${runtime_rate}
49 | | ... | frame_size=${frame_size}
50 | | ... | traffic_profile=${traffic_profile}
51 | | ... | async_call=${True}
52 | | ... | ppta=${ppta}
53 | | ... | use_latency=${use_latency}
54 | | ... | traffic_directions=${traffic_directions}
55 | | ... | transaction_duration=${transaction_duration}
56 | | ... | transaction_scale=${transaction_scale}
57 | | ... | transaction_type=${transaction_type}
58 | | ... | duration_limit=${0.0}
59 | | ... | ramp_up_duration=${ramp_up_duration}
60 | | ... | ramp_up_rate=${ramp_up_rate}
61 | | Run Telemetry On All DUTs
62 | | ... | ${nodes} | profile=vpp_runtime.yaml
63 | | Stop traffic on tg
64
65 | Additional Statistics Action For vpp-runtime-iperf3
66 | | [Documentation]
67 | | ... | Additional Statistics Action for clear and show runtime counters with
68 | | ... | iPerf3 running traffic.
69 | |
70 | | ... | See documentation of the called keyword for required test variables.
71 | |
72 | | ${runtime_duration} = | Get Runtime Duration
73 | | ${pids}= | iPerf Client Start Remote Exec
74 | | | ... | ${nodes['${iperf_client_node}']}
75 | | | ... | duration=${-1}
76 | | | ... | rate=${None}
77 | | | ... | frame_size=${None}
78 | | | ... | async_call=True
79 | | | ... | warmup_time=0
80 | | | ... | traffic_directions=${1}
81 | | | ... | namespace=${iperf_client_namespace}
82 | | | ... | udp=${iperf_client_udp}
83 | | | ... | host=${iperf_server_bind}
84 | | | ... | bind=${iperf_client_bind}
85 | | | ... | affinity=${iperf_client_affinity}
86 | | Run Telemetry On All DUTs
87 | | ... | ${nodes} | profile=vpp_runtime.yaml
88 | | iPerf Client Stop Remote Exec | ${nodes['${iperf_client_node}']} | ${pids}
89
90 | Additional Statistics Action For noop
91 | | [Documentation]
92 | | ... | Additional Statistics Action for no operation.
93 | |
94 | | No operation
95
96 | Additional Statistics Action For vpp-clear-stats
97 | | [Documentation]
98 | | ... | Additional Statistics Action for clear VPP statistics.
99 | |
100 | | Run Telemetry On All DUTs
101 | | ... | ${nodes} | profile=vpp_clear_stats.yaml
102
103 | Additional Statistics Action For vpp-enable-packettrace
104 | | [Documentation]
105 | | ... | Additional Statistics Action for enable VPP packet trace.
106 | |
107 | | Run Keyword If | ${extended_debug}==${True}
108 | | ... | VPP Enable Traces On All DUTs | ${nodes} | fail_on_error=${False}
109
110 | Additional Statistics Action For vpp-show-packettrace
111 | | [Documentation]
112 | | ... | Additional Statistics Action for show VPP packet trace.
113 | |
114 | | Run Keyword If | ${extended_debug}==${True}
115 | | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100}
116
117 | Additional Statistics Action For vpp-show-stats
118 | | [Documentation]
119 | | ... | Additional Statistics Action for show VPP statistics.
120 | |
121 | | Run Telemetry On All DUTs
122 | | ... | ${nodes} | profile=vpp_show_stats.yaml