Rename Ligato tests
[csit.git] / resources / libraries / robot / performance / performance_utils.robot
1 # Copyright (c) 2017 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 | Library | Collections
16 | Library | resources.libraries.python.topology.Topology
17 | Library | resources.libraries.python.NodePath
18 | Library | resources.libraries.python.DpdkUtil
19 | Library | resources.libraries.python.InterfaceUtil
20 | Library | resources.libraries.python.KubernetesUtils
21 | Library | resources.libraries.python.VhostUser
22 | Library | resources.libraries.python.TrafficGenerator
23 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
24 | Resource | resources/libraries/robot/shared/default.robot
25 | Resource | resources/libraries/robot/shared/interfaces.robot
26 | Resource | resources/libraries/robot/shared/counters.robot
27 | Resource | resources/libraries/robot/shared/container.robot
28 | Resource | resources/libraries/robot/shared/memif.robot
29 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
30 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
31 | Resource | resources/libraries/robot/ip/ip4.robot
32 | Resource | resources/libraries/robot/ip/ip6.robot
33 | Resource | resources/libraries/robot/vm/qemu.robot
34 | Resource | resources/libraries/robot/l2/tagging.robot
35 | Documentation | Performance suite keywords - utilities to find and verify NDR
36 | ... | and PDR.
37
38 *** Keywords ***
39 | Calculate pps
40 | | [Documentation]
41 | | ... | Calculate pps for given rate and L2 frame size,
42 | | ... | additional 20B are added to L2 frame size as padding.
43 | | ...
44 | | ... | *Arguments*
45 | | ... | - bps - Rate in bps. Type: integer
46 | | ... | - framesize - L2 frame size in Bytes. Type: integer
47 | | ...
48 | | ... | *Return*
49 | | ... | - Calculated pps. Type: integer
50 | | ...
51 | | ... | *Example:*
52 | | ...
53 | | ... | \| Calculate pps \| 10000000000 \| 64 \|
54 | | ...
55 | | [Arguments] | ${bps} | ${framesize}
56 | | ...
57 | | ${framesize}= | Get Frame Size | ${framesize}
58 | | ${ret}= | Evaluate | (${bps}/((${framesize}+20)*8)).__trunc__()
59 | | Return From Keyword | ${ret}
60
61 | Get Frame Size
62 | | [Documentation]
63 | | ... | Framesize can be either integer in case of a single packet
64 | | ... | in stream, or set of packets in case of IMIX type or simmilar.
65 | | ... | This keyword returns average framesize.
66 | | ...
67 | | ... | *Arguments:*
68 | | ... | - framesize - Framesize. Type: integer or string
69 | | ...
70 | | ... | *Example:*
71 | | ...
72 | | ... | \| Get Frame Size \| IMIX_v4_1 \|
73 | | ...
74 | | [Arguments] | ${framesize}
75 | | ...
76 | | Run Keyword If | '${framesize}' == 'IMIX_v4_1'
77 | | ... | Return From Keyword | 353.83333
78 | | Return From Keyword | ${framesize}
79
80 | Is DPDK performance test
81 | | [Documentation]
82 | | ... | Return TRUE if variable DPDK_TEST exist, otherwise FALSE.
83 | | ${ret} | ${tmp}= | Run Keyword And Ignore Error
84 | | ... | Variable Should Exist | ${DPDK_TEST}
85 | | Return From Keyword If | "${ret}" == "PASS" | ${TRUE}
86 | | Return From Keyword | ${FALSE}
87
88 | Find NDR using linear search and pps
89 | | [Documentation]
90 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
91 | | ...
92 | | ... | *Arguments:*
93 | | ... | - framesize - L2 Frame Size [B]. Type: integer
94 | | ... | - start_rate - Initial start rate [pps]. Type: float
95 | | ... | - step_rate - Step of linear search [pps]. Type: float
96 | | ... | - topology_type - Topology type. Type: string
97 | | ... | - min_rate - Lower limit of search [pps]. Type: float
98 | | ... | - max_rate - Upper limit of search [pps]. Type: float
99 | | ...
100 | | ... | *Return:*
101 | | ... | - No value returned
102 | | ...
103 | | ... | *Example:*
104 | | ...
105 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \
106 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \|
107 | | ...
108 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
109 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
110 | | ...
111 | | ${duration}= | Set Variable | ${perf_trial_duration}
112 | | Set Duration | ${duration}
113 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
114 | | Set Search Linear Step | ${step_rate}
115 | | Set Search Frame Size | ${framesize}
116 | | Set Search Rate Type pps
117 | | Linear Search | ${start_rate} | ${topology_type}
118 | | ${rate_per_stream} | ${lat}= | Verify Search Result
119 | | ${tmp}= | Create List | 100%NDR | ${lat}
120 | | ${latency}= | Create List | ${tmp}
121 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
122 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
123 | | ... | ${framesize} | ${topology_type}
124 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
125 | | Append To List | ${latency} | ${tmp}
126 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
127 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
128 | | ... | ${framesize} | ${topology_type}
129 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
130 | | Append To List | ${latency} | ${tmp}
131 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
132 | | ... | ${latency}
133 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
134 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
135
136 | Find PDR using linear search and pps
137 | | [Documentation]
138 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
139 | | ... | with PDR threshold and type specified by parameter.
140 | | ...
141 | | ... | *Arguments:*
142 | | ... | - framesize - L2 Frame Size [B]. Type: integer
143 | | ... | - start_rate - Initial start rate [pps]. Type: float
144 | | ... | - step_rate - Step of linear search [pps]. Type: float
145 | | ... | - topology_type - Topology type. Type: string
146 | | ... | - min_rate - Lower limit of search [pps]. Type: float
147 | | ... | - max_rate - Upper limit of search [pps]. Type: float
148 | | ... | - loss_acceptance - Accepted loss during search. Type: float
149 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
150 | | ...
151 | | ... | *Example:*
152 | | ...
153 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
154 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage \|
155 | | ...
156 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
157 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
158 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
159 | | ...
160 | | ${duration}= | Set Variable | ${perf_trial_duration}
161 | | Set Duration | ${duration}
162 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
163 | | Set Search Linear Step | ${step_rate}
164 | | Set Search Frame Size | ${framesize}
165 | | Set Search Rate Type pps
166 | | Set Loss Acceptance | ${loss_acceptance}
167 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
168 | | ... | Set Loss Acceptance Type Percentage
169 | | Linear Search | ${start_rate} | ${topology_type}
170 | | ${rate_per_stream} | ${lat}= | Verify Search Result
171 | | ${tmp}= | Create List | 100%PDR | ${lat}
172 | | ${latency}= | Create List | ${tmp}
173 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
174 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
175 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
176 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
177 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
178
179 | Find NDR using binary search and pps
180 | | [Documentation]
181 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
182 | | ...
183 | | ... | *Arguments:*
184 | | ... | - framesize - L2 Frame Size [B]. Type: integer
185 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
186 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
187 | | ... | - topology_type - Topology type. Type: string
188 | | ... | - min_rate - Lower limit of search [pps]. Type: float
189 | | ... | - max_rate - Upper limit of search [pps]. Type: float
190 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
191 | | ...
192 | | ... | *Example:*
193 | | ...
194 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
195 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \|
196 | | ...
197 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
198 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
199 | | ...
200 | | ${duration}= | Set Variable | ${perf_trial_duration}
201 | | Set Duration | ${duration}
202 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
203 | | Set Search Frame Size | ${framesize}
204 | | Set Search Rate Type pps
205 | | Set Binary Convergence Threshold | ${threshold}
206 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
207 | | ${rate_per_stream} | ${lat}= | Verify Search Result
208 | | ${tmp}= | Create List | 100%NDR | ${lat}
209 | | ${latency}= | Create List | ${tmp}
210 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
211 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
212 | | ... | ${framesize} | ${topology_type}
213 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
214 | | Append To List | ${latency} | ${tmp}
215 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
216 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
217 | | ... | ${framesize} | ${topology_type}
218 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
219 | | Append To List | ${latency} | ${tmp}
220 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
221 | | ... | ${latency}
222 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
223 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
224
225 | Find PDR using binary search and pps
226 | | [Documentation]
227 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
228 | | ... | with PDR threshold and type specified by parameter.
229 | | ...
230 | | ... | *Arguments:*
231 | | ... | - framesize - L2 Frame Size [B]. Type: integer
232 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
233 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
234 | | ... | - topology_type - Topology type. Type: string
235 | | ... | - min_rate - Lower limit of search [pps]. Type: float
236 | | ... | - max_rate - Upper limit of search [pps]. Type: float
237 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
238 | | ... | - loss_acceptance - Accepted loss during search. Type: float
239 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
240 | | ...
241 | | ... | *Example:*
242 | | ...
243 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
244 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
245 | | ... | \| percentage \|
246 | | ...
247 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
248 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
249 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
250 | | ...
251 | | ${duration}= | Set Variable | ${perf_trial_duration}
252 | | Set Duration | ${duration}
253 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
254 | | Set Search Frame Size | ${framesize}
255 | | Set Search Rate Type pps
256 | | Set Loss Acceptance | ${loss_acceptance}
257 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
258 | | ... | Set Loss Acceptance Type Percentage
259 | | Set Binary Convergence Threshold | ${threshold}
260 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
261 | | ${rate_per_stream} | ${lat}= | Verify Search Result
262 | | ${tmp}= | Create List | 100%PDR | ${lat}
263 | | ${latency}= | Create List | ${tmp}
264 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
265 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
266 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
267 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
268 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
269
270 | Find NDR using combined search and pps
271 | | [Documentation]
272 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
273 | | ... | non drop rate.
274 | | ...
275 | | ... | *Arguments:*
276 | | ... | - framesize - L2 Frame Size [B]. Type: integer
277 | | ... | - start_rate - Initial start rate [pps]. Type: float
278 | | ... | - step_rate - Step of linear search [pps]. Type: float
279 | | ... | - topology_type - Topology type. Type: string
280 | | ... | - min_rate - Lower limit of search [pps]. Type: float
281 | | ... | - max_rate - Upper limit of search [pps]. Type: float
282 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
283 | | ...
284 | | ... | *Example:*
285 | | ...
286 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
287 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \|
288 | | ...
289 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
290 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
291 | | ...
292 | | ${duration}= | Set Variable | ${perf_trial_duration}
293 | | Set Duration | ${duration}
294 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
295 | | Set Search Linear Step | ${step_rate}
296 | | Set Search Frame Size | ${framesize}
297 | | Set Search Rate Type pps
298 | | Set Binary Convergence Threshold | ${threshold}
299 | | Combined Search | ${start_rate} | ${topology_type}
300 | | ${rate_per_stream} | ${lat}= | Verify Search Result
301 | | ${tmp}= | Create List | 100%NDR | ${lat}
302 | | ${latency}= | Create List | ${tmp}
303 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
304 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
305 | | ... | ${framesize} | ${topology_type}
306 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
307 | | Append To List | ${latency} | ${tmp}
308 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
309 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
310 | | ... | ${framesize} | ${topology_type}
311 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
312 | | Append To List | ${latency} | ${tmp}
313 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
314 | | ... | ${latency}
315 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
316 | | ... | ${framesize} | ${topology_type}
317 | | ... | fail_on_loss=${False}
318
319 | Find PDR using combined search and pps
320 | | [Documentation]
321 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
322 | | ... | partial drop rate with PDR threshold and type specified by parameter.
323 | | ...
324 | | ... | *Arguments:*
325 | | ... | - framesize - L2 Frame Size [B]. Type: integer
326 | | ... | - start_rate - Initial start rate [pps]. Type: float
327 | | ... | - step_rate - Step of linear search [pps]. Type: float
328 | | ... | - topology_type - Topology type. Type: string
329 | | ... | - min_rate - Lower limit of search [pps]. Type: float
330 | | ... | - max_rate - Upper limit of search [pps]. Type: float
331 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
332 | | ... | - loss_acceptance - Accepted loss during search. Type: float
333 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
334 | | ...
335 | | ... | *Example:*
336 | | ...
337 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
338 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
339 | | ... | \| percentage \|
340 | | ...
341 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
342 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
343 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
344 | | ...
345 | | ${duration}= | Set Variable | ${perf_trial_duration}
346 | | Set Duration | ${duration}
347 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
348 | | Set Search Linear Step | ${step_rate}
349 | | Set Search Frame Size | ${framesize}
350 | | Set Search Rate Type pps
351 | | Set Loss Acceptance | ${loss_acceptance}
352 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
353 | | ... | Set Loss Acceptance Type Percentage
354 | | Set Binary Convergence Threshold | ${threshold}
355 | | Combined Search | ${start_rate} | ${topology_type}
356 | | ${rate_per_stream} | ${lat}= | Verify Search Result
357 | | ${tmp}= | Create List | 100%PDR | ${lat}
358 | | ${latency}= | Create List | ${tmp}
359 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
360 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
361 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
362 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
363 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
364
365 | Display result of NDR search
366 | | [Documentation]
367 | | ... | Display result of NDR search in packet per seconds (total and per
368 | | ... | stream) and Gbps total bandwidth with untagged packet.
369 | | ... | Througput is calculated as:
370 | | ... | Measured rate per stream * Total number of streams
371 | | ... | Bandwidth is calculated as:
372 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
373 | | ...
374 | | ... | *Arguments:*
375 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
376 | | ... | - framesize - L2 Frame Size [B]. Type: integer
377 | | ... | - nr_streams - Total number of streams. Type: integer
378 | | ... | - latency - Latency stats. Type: dictionary
379 | | ...
380 | | ... | *Example:*
381 | | ...
382 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
383 | | ... | \| [100%NDR, [10/10/10, 1/2/3]] \|
384 | | ...
385 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams} | ${latency}
386 | | ...
387 | | ${framesize}= | Get Frame Size | ${framesize}
388 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
389 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
390 | | Set Test Message | FINAL_RATE: ${rate_total} pps
391 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
392 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
393 | | ... | append=yes
394 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
395 | | :FOR | ${lat} | IN | @{latency}
396 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
397
398 | Display result of PDR search
399 | | [Documentation]
400 | | ... | Display result of PDR search in packet per seconds (total and per
401 | | ... | stream) and Gbps total bandwidth with untagged packet.
402 | | ... | Througput is calculated as:
403 | | ... | Measured rate per stream * Total number of streams
404 | | ... | Bandwidth is calculated as:
405 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
406 | | ...
407 | | ... | *Arguments:*
408 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
409 | | ... | - framesize - L2 Frame Size [B]. Type: integer
410 | | ... | - nr_streams - Total number of streams. Type: integer
411 | | ... | - loss_acceptance - Accepted loss during search. Type: float
412 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
413 | | ... | - latency - Latency stats. Type: dictionary
414 | | ...
415 | | ... | *Example:*
416 | | ...
417 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
418 | | ... | \| percentage \| [100%NDR, [10/10/10, 1/2/3]] \|
419 | | ...
420 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
421 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
422 | | ...
423 | | ${framesize}= | Get Frame Size | ${framesize}
424 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
425 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
426 | | Set Test Message | FINAL_RATE: ${rate_total} pps
427 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
428 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
429 | | ... | append=yes
430 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
431 | | :FOR | ${lat} | IN | @{latency}
432 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
433 | | Set Test Message
434 | | ... | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
435 | | ... | append=yes
436
437 | Measure latency pps
438 | | [Documentation]
439 | | ... | Send traffic at specified rate. Measure min/avg/max latency
440 | | ...
441 | | ... | *Arguments:*
442 | | ... | - duration - Duration of traffic run [s]. Type: integer
443 | | ... | - rate - Rate for sending packets. Type: integer
444 | | ... | - framesize - L2 Frame Size [B]. Type: integer
445 | | ... | - topology_type - Topology type. Type: string
446 | | ...
447 | | ... | *Example:*
448 | | ...
449 | | ... | \| Measure latency \| 10 \| 4.0 \| 64 \| 3-node-IPv4 \|
450 | | ...
451 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
452 | | ...
453 | | Return From Keyword If | ${rate} <= 10000 | ${-1}
454 | | ${ret}= | Is DPDK performance test
455 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
456 | | Send traffic on tg | ${duration} | ${rate}pps | ${framesize}
457 | | ... | ${topology_type} | warmup_time=0
458 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs | ${nodes}
459 | | Run keyword and return | Get latency
460
461 | Traffic should pass with no loss
462 | | [Documentation]
463 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
464 | | ... | evaluation.
465 | | ...
466 | | ... | *Arguments:*
467 | | ... | - duration - Duration of traffic run [s]. Type: integer
468 | | ... | - rate - Rate for sending packets. Type: string
469 | | ... | - framesize - L2 Frame Size [B]. Type: integer
470 | | ... | - topology_type - Topology type. Type: string
471 | | ... | - fail_on_loss - If True, the keyword fails if loss occurred.
472 | | ... | Type: boolean
473 | | ...
474 | | ... | *Example:*
475 | | ...
476 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
477 | | ... | \| 3-node-IPv4 \|
478 | | ...
479 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
480 | | ... | ${fail_on_loss}=${True}
481 | | ...
482 | | Clear and show runtime counters with running traffic | ${duration}
483 | | ... | ${rate} | ${framesize} | ${topology_type}
484 | | ${ret}= | Is DPDK performance test
485 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
486 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
487 | | ... | ${topology_type} | warmup_time=0
488 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs | ${nodes}
489 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
490
491 | Traffic should pass with partial loss
492 | | [Documentation]
493 | | ... | Send traffic at specified rate. Partial packet loss is accepted
494 | | ... | within loss acceptance value specified as argument.
495 | | ...
496 | | ... | *Arguments:*
497 | | ... | - duration - Duration of traffic run [s]. Type: integer
498 | | ... | - rate - Rate for sending packets. Type: string
499 | | ... | - framesize - L2 Frame Size [B]. Type: integer
500 | | ... | - topology_type - Topology type. Type: string
501 | | ... | - loss_acceptance - Accepted loss during search. Type: float
502 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
503 | | ...
504 | | ... | *Example:*
505 | | ...
506 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
507 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
508 | | ...
509 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
510 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
511 | | ... | ${fail_on_loss}=${True}
512 | | ...
513 | | Clear and show runtime counters with running traffic | ${duration}
514 | | ... | ${rate} | ${framesize} | ${topology_type}
515 | | ${ret}= | Is DPDK performance test
516 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
517 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
518 | | ... | ${topology_type} | warmup_time=0
519 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs | ${nodes}
520 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
521 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
522
523 | Clear and show runtime counters with running traffic
524 | | [Documentation]
525 | | ... | Start traffic at specified rate then clear runtime counters on all
526 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
527 | | ... | on all DUTs. Finally stop traffic
528 | | ...
529 | | ... | *Arguments:*
530 | | ... | - duration - Duration of traffic run [s]. Type: integer
531 | | ... | - rate - Rate for sending packets. Type: string
532 | | ... | - framesize - L2 Frame Size [B]. Type: integer
533 | | ... | - topology_type - Topology type. Type: string
534 | | ...
535 | | ... | *Example:*
536 | | ...
537 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
538 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
539 | | ...
540 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
541 | | ...
542 | | Send traffic on tg | -1 | ${rate} | ${framesize} | ${topology_type}
543 | | ... | warmup_time=0 | async_call=${True} | latency=${False}
544 | | ${ret}= | Is DPDK performance test
545 | | Run Keyword If | ${ret}==${FALSE}
546 | | ... | Clear runtime counters on all DUTs | ${nodes}
547 | | Sleep | ${duration}
548 | | Run Keyword If | ${ret}==${FALSE}
549 | | ... | Show runtime counters on all DUTs | ${nodes}
550 | | Stop traffic on tg