Revert "fix(IPsecUtil): Delete keywords no longer used"
[csit.git] / resources / libraries / robot / performance / performance_actions.robot
1 # Copyright (c) 2023 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 trex-runtime
30 | | [Documentation]
31 | | ... | Additional Statistics Action for T-Rex telemetry 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 | | Sleep | 1s
62 | | Stop traffic on tg
63
64 | Additional Statistics Action For vpp-runtime
65 | | [Documentation]
66 | | ... | Additional Statistics Action for clear and show runtime counters with
67 | | ... | running traffic.
68 | |
69 | | ... | See documentation of the called keyword for required test variables.
70 | |
71 | | ${ppta} = | Get Packets Per Transaction Aggregated
72 | | ${ramp_up_duration} = | Get Ramp Up Duration
73 | | ${ramp_up_rate} = | Get Ramp Up Rate
74 | | ${runtime_duration} = | Get Runtime Duration
75 | | ${runtime_rate} = | Get Runtime Rate
76 | | ${traffic_directions} = | Get Traffic Directions
77 | | ${transaction_duration} = | Get Transaction Duration
78 | | ${transaction_scale} = | Get Transaction Scale
79 | | ${transaction_type} = | Get Transaction Type
80 | | ${use_latency} = | Get Use Latency
81 | | Send traffic on tg
82 | | ... | duration=${-1}
83 | | ... | rate=${runtime_rate}
84 | | ... | frame_size=${frame_size}
85 | | ... | traffic_profile=${traffic_profile}
86 | | ... | async_call=${True}
87 | | ... | ppta=${ppta}
88 | | ... | use_latency=${use_latency}
89 | | ... | traffic_directions=${traffic_directions}
90 | | ... | transaction_duration=${transaction_duration}
91 | | ... | transaction_scale=${transaction_scale}
92 | | ... | transaction_type=${transaction_type}
93 | | ... | duration_limit=${0.0}
94 | | ... | ramp_up_duration=${ramp_up_duration}
95 | | ... | ramp_up_rate=${ramp_up_rate}
96 | | Run Telemetry On All DUTs
97 | | ... | ${nodes} | profile=vppctl_runtime.yaml
98 | | ... | rate=${telemetry_rate} | export=${telemetry_export}
99 | | Stop traffic on tg
100
101 | Additional Statistics Action For bpf-runtime
102 | | [Documentation]
103 | | ... | Additional Statistics Action for linux bundle counters with
104 | | ... | running traffic.
105 | |
106 | | ... | See documentation of the called keyword for required test variables.
107 | |
108 | | ${ppta} = | Get Packets Per Transaction Aggregated
109 | | ${ramp_up_duration} = | Get Ramp Up Duration
110 | | ${ramp_up_rate} = | Get Ramp Up Rate
111 | | ${runtime_duration} = | Get Runtime Duration
112 | | ${runtime_rate} = | Get Runtime Rate
113 | | ${traffic_directions} = | Get Traffic Directions
114 | | ${transaction_duration} = | Get Transaction Duration
115 | | ${transaction_scale} = | Get Transaction Scale
116 | | ${transaction_type} = | Get Transaction Type
117 | | ${use_latency} = | Get Use Latency
118 | | Send traffic on tg
119 | | ... | duration=${-1}
120 | | ... | rate=${runtime_rate}
121 | | ... | frame_size=${frame_size}
122 | | ... | traffic_profile=${traffic_profile}
123 | | ... | async_call=${True}
124 | | ... | ppta=${ppta}
125 | | ... | use_latency=${use_latency}
126 | | ... | traffic_directions=${traffic_directions}
127 | | ... | transaction_duration=${transaction_duration}
128 | | ... | transaction_scale=${transaction_scale}
129 | | ... | transaction_type=${transaction_type}
130 | | ... | duration_limit=${0.0}
131 | | ... | ramp_up_duration=${ramp_up_duration}
132 | | ... | ramp_up_rate=${ramp_up_rate}
133 | | Run Telemetry On All DUTs
134 | | ... | ${nodes} | profile=bpf_runtime.yaml
135 | | ... | rate=${telemetry_rate} | export=${False}
136 | | Stop traffic on tg
137
138 | Additional Statistics Action For perf-stat-runtime
139 | | [Documentation]
140 | | ... | Additional Statistics Action for linux bundle counters with
141 | | ... | running traffic.
142 | |
143 | | ... | See documentation of the called keyword for required test variables.
144 | |
145 | | ${ppta} = | Get Packets Per Transaction Aggregated
146 | | ${ramp_up_duration} = | Get Ramp Up Duration
147 | | ${ramp_up_rate} = | Get Ramp Up Rate
148 | | ${runtime_duration} = | Get Runtime Duration
149 | | ${runtime_rate} = | Get Runtime Rate
150 | | ${traffic_directions} = | Get Traffic Directions
151 | | ${transaction_duration} = | Get Transaction Duration
152 | | ${transaction_scale} = | Get Transaction Scale
153 | | ${transaction_type} = | Get Transaction Type
154 | | ${use_latency} = | Get Use Latency
155 | | Send traffic on tg
156 | | ... | duration=${-1}
157 | | ... | rate=${runtime_rate}
158 | | ... | frame_size=${frame_size}
159 | | ... | traffic_profile=${traffic_profile}
160 | | ... | async_call=${True}
161 | | ... | ppta=${ppta}
162 | | ... | use_latency=${use_latency}
163 | | ... | traffic_directions=${traffic_directions}
164 | | ... | transaction_duration=${transaction_duration}
165 | | ... | transaction_scale=${transaction_scale}
166 | | ... | transaction_type=${transaction_type}
167 | | ... | duration_limit=${0.0}
168 | | ... | ramp_up_duration=${ramp_up_duration}
169 | | ... | ramp_up_rate=${ramp_up_rate}
170 | | Run Telemetry On All DUTs
171 | | ... | ${nodes} | profile=perf_stat_runtime.yaml
172 | | ... | rate=${telemetry_rate} | export=${False}
173 | | Stop traffic on tg
174
175 | Additional Statistics Action For vpp-runtime-iperf3
176 | | [Documentation]
177 | | ... | Additional Statistics Action for clear and show runtime counters with
178 | | ... | iPerf3 running traffic.
179 | |
180 | | ... | See documentation of the called keyword for required test variables.
181 | |
182 | | ${runtime_duration} = | Get Runtime Duration
183 | | ${pids}= | iPerf Client Start Remote Exec
184 | | | ... | ${nodes['${iperf_client_node}']}
185 | | | ... | duration=${-1}
186 | | | ... | rate=${None}
187 | | | ... | frame_size=${None}
188 | | | ... | async_call=True
189 | | | ... | warmup_time=0
190 | | | ... | traffic_directions=${1}
191 | | | ... | namespace=${iperf_client_namespace}
192 | | | ... | udp=${iperf_client_udp}
193 | | | ... | host=${iperf_server_bind}
194 | | | ... | bind=${iperf_client_bind}
195 | | | ... | affinity=${iperf_client_affinity}
196 | | Run Telemetry On All DUTs
197 | | ... | ${nodes} | profile=vppctl_runtime.yaml
198 | | ... | rate=${telemetry_rate} | export=${telemetry_export}
199 | | iPerf Client Stop Remote Exec | ${nodes['${iperf_client_node}']} | ${pids}
200
201 | Additional Statistics Action For noop
202 | | [Documentation]
203 | | ... | Additional Statistics Action for no operation.
204 | |
205 | | No operation
206
207 | Additional Statistics Action For vpp-clear-stats
208 | | [Documentation]
209 | | ... | Additional Statistics Action for clear VPP statistics.
210 | |
211 | | Run Telemetry On All DUTs
212 | | ... | ${nodes} | profile=vppctl_clear_stats.yaml
213 | | ... | export=${False}
214
215 | Additional Statistics Action For vpp-enable-packettrace
216 | | [Documentation]
217 | | ... | Additional Statistics Action for enable VPP packet trace.
218 | |
219 | | Run Keyword If | ${extended_debug}==${True}
220 | | ... | VPP Enable Traces On All DUTs | ${nodes} | fail_on_error=${False}
221
222 | Additional Statistics Action For vpp-show-packettrace
223 | | [Documentation]
224 | | ... | Additional Statistics Action for show VPP packet trace.
225 | |
226 | | Run Keyword If | ${extended_debug}==${True}
227 | | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100}
228
229 | Additional Statistics Action For vpp-show-stats
230 | | [Documentation]
231 | | ... | Additional Statistics Action for show VPP statistics.
232 | |
233 | | Run Telemetry On All DUTs
234 | | ... | ${nodes} | profile=vppctl_show_stats.yaml
235 | | ... | export=${False}