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