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