Delete old NDR/PDR keywords
[csit.git] / resources / libraries / robot / performance / performance_utils.robot
1 # Copyright (c) 2018 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.OptimizedSearch
24 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
25 | Library | resources.libraries.python.Trace
26 | Resource | resources/libraries/robot/shared/default.robot
27 | Resource | resources/libraries/robot/shared/interfaces.robot
28 | Resource | resources/libraries/robot/shared/counters.robot
29 | Resource | resources/libraries/robot/shared/container.robot
30 | Resource | resources/libraries/robot/shared/memif.robot
31 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
32 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
33 | Resource | resources/libraries/robot/ip/ip4.robot
34 | Resource | resources/libraries/robot/ip/ip6.robot
35 | Resource | resources/libraries/robot/vm/qemu.robot
36 | Resource | resources/libraries/robot/l2/tagging.robot
37 | Documentation | Performance suite keywords - utilities to find and verify NDR
38 | ... | and PDR.
39
40 *** Keywords ***
41 | Get Max Rate And Jumbo
42 | | [Documentation]
43 | | ... | Argument framesize can be either integer in case of a single packet
44 | | ... | in stream, or IMIX string defining mix of packets.
45 | | ... | For jumbo frames detection, the maximal packet size is relevant.
46 | | ... | For maximal transmit rate, the average packet size is relevant.
47 | | ... | In both cases, encapsulation overhead (if any) has effect.
48 | | ... | The maximal rate is computed from line limit bandwidth,
49 | | ... | but NICs also have an independent limit in packet rate.
50 | | ... | For some NICs, the limit is not reachable (bps limit is stricter),
51 | | ... | in those cases None is used (meaning no limiting).
52 | | ...
53 | | ... | This keyword returns computed maximal unidirectional transmit rate
54 | | ... | and jumbo boolean (some suites need that).
55 | | ...
56 | | ... | *Arguments:*
57 | | ... | - bps_limit - Line rate limit in bps. Type: integer
58 | | ... | - framesize - Framesize in bytes or IMIX. Type: integer or string
59 | | ... | - overhead - Overhead in bytes. Default: 0. Type: integer
60 | | ... | - pps_limit - NIC limit rate value in pps. Type: integer or None
61 | | ...
62 | | ... | *Returns:*
63 | | ... | - 2-tuple, consisting of:
64 | | ... |   - Calculated unidirectional maximal transmit rate.
65 | | ... |     Type: integer or float
66 | | ... |   - Jumbo boolean, true if jumbo packet support has to be enabled.
67 | | ... |     Type: boolean
68 | | ...
69 | | ... | *Example:*
70 | | ...
71 | | ... | \| Get Max Rate And Jumbo | \${10000000} \| IMIX_v4_1 \
72 | | ... | \| overhead=\${40} \| pps_limit=\${18750000} \|
73 | | ...
74 | | [Arguments] | ${bps_limit} | ${framesize}
75 | | ... | ${overhead}=${0} | ${pps_limit}=${None}
76 | | ...
77 | | ${avg_size} = | Set Variable If | '${framesize}' == 'IMIX_v4_1'
78 | | ... | ${353.83333} | ${framesize}
79 | | ${max_size} = | Set Variable If | '${framesize}' == 'IMIX_v4_1'
80 | | ... | ${1518} | ${framesize}
81 | | # swo := size_with_overhead
82 | | ${avg_swo} = | Evaluate | ${avg_size} + ${overhead}
83 | | ${max_swo} = | Evaluate | ${max_size} + ${overhead}
84 | | ${jumbo} = | Set Variable If | ${max_swo} < 1522
85 | | ... | ${False} | ${True}
86 | | # For testing None see: https://groups.google.com/\
87 | | #                       forum/#!topic/robotframework-users/XntFz0ocD9E
88 | | ${limit_set} = | Set Variable | ${pps_limit != None}
89 | | ${rate} = | Evaluate | (${bps_limit}/((${avg_swo}+20)*8)).__trunc__()
90 | | ${max_rate} = | Set Variable If | ${limit_set} and ${rate} > ${pps_limit}
91 | | ... | ${pps_limit} | ${rate}
92 | | Return From Keyword | ${max_rate} | ${jumbo}
93
94 | Get Max Rate And Jumbo And Handle Multi Seg
95 | | [Documentation]
96 | | ... | This keyword adds correct multi seg configuration,
97 | | ... | then returns the result of Get Max Rate And Jumbo keyword.
98 | | ...
99 | | ... | See Documentation of Get Max Rate And Jumbo for more details.
100 | | ...
101 | | ... | *Arguments:*
102 | | ... | - bps_limit - Line rate limit in bps. Type: integer
103 | | ... | - framesize - Framesize in bytes. Type: integer or string
104 | | ... | - overhead - Overhead in bytes. Default: 0. Type: integer
105 | | ... | - pps_limit - NIC limit rate value in pps. Type: integer or None
106 | | ...
107 | | ... | *Returns:*
108 | | ... | - 2-tuple, consisting of:
109 | | ... |   - Calculated unidirectional maximal transmit rate.
110 | | ... |     Type: integer or float
111 | | ... |   - Jumbo boolean, true if jumbo packet support has to be enabled.
112 | | ... |     Type: boolean
113 | | ...
114 | | ... | *Example:*
115 | | ...
116 | | ... | \| Get Max Rate And Jumbo And Handle Multi Seg | \${10000000} \
117 | | ... | \| IMIX_v4_1 \| overhead=\${40} \| pps_limit=\${18750000} \|
118 | | ...
119 | | [Arguments] | ${bps_limit} | ${framesize}
120 | | ... | ${overhead}=${0} | ${pps_limit}=${None}
121 | | ...
122 | | ${max_rate} | ${jumbo} = | Get Max Rate And Jumbo
123 | | ... | ${bps_limit} | ${framesize} | ${overhead} | ${pps_limit}
124 | | Run Keyword If | not ${jumbo} | Add no multi seg to all DUTs
125 | | Return From Keyword | ${max_rate} | ${jumbo}
126
127 | Calculate pps
128 | | [Documentation]
129 | | ... | Calculate pps for given rate and L2 frame size,
130 | | ... | additional 20B are added to L2 frame size as padding.
131 | | ...
132 | | ... | FIXME: Migrate callers to Get Max Rate And Jumbo
133 | | ...
134 | | ... | *Arguments*
135 | | ... | - bps - Rate in bps. Type: integer
136 | | ... | - framesize - L2 frame size in Bytes. Type: integer
137 | | ...
138 | | ... | *Return*
139 | | ... | - Calculated pps. Type: integer
140 | | ...
141 | | ... | *Example:*
142 | | ...
143 | | ... | \| Calculate pps \| 10000000000 \| 64 \|
144 | | ...
145 | | [Arguments] | ${bps} | ${framesize}
146 | | ...
147 | | ${framesize}= | Get Frame Size | ${framesize}
148 | | ${ret}= | Evaluate | (${bps}/((${framesize}+20)*8)).__trunc__()
149 | | Return From Keyword | ${ret}
150
151 | Get Frame Size
152 | | [Documentation]
153 | | ... | Framesize can be either integer in case of a single packet
154 | | ... | in stream, or set of packets in case of IMIX type or simmilar.
155 | | ... | This keyword returns average framesize.
156 | | ...
157 | | ... | FIXME: Migrate callers to Get Max Rate And Jumbo
158 | | ...
159 | | ... | *Arguments:*
160 | | ... | - framesize - Framesize. Type: integer or string
161 | | ...
162 | | ... | *Example:*
163 | | ...
164 | | ... | \| Get Frame Size \| IMIX_v4_1 \|
165 | | ...
166 | | [Arguments] | ${framesize}
167 | | ...
168 | | Return From Keyword If | '${framesize}' == 'IMIX_v4_1' | ${353.83333}
169 | | Return From Keyword | ${framesize}
170
171 | Find NDR and PDR intervals using optimized search
172 | | [Documentation]
173 | | ... | Find boundaries for RFC2544 compatible NDR and PDR values
174 | | ... | using an optimized search algorithm.
175 | | ... | Display results as formatted test message.
176 | | ... | Fail if a resulting lower bound has too high loss fraction.
177 | | ... | Proceed with Perform additional measurements based on NDRPDR result.
178 | | ... | Input rates are understood as uni-directional,
179 | | ... | reported result contains bi-directional rates.
180 | | ...
181 | | ... | TODO: Should the trial duration of the additional
182 | | ... | measurements be configurable?
183 | | ...
184 | | ... | *Arguments:*
185 | | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
186 | | ... | - topology_type - Topology type. Type: string
187 | | ... | - minimum_transmit_rate - Lower limit of search [pps]. Type: float
188 | | ... | - maximum_transmit_rate - Upper limit of search [pps]. Type: float
189 | | ... | - packet_loss_ratio - Accepted loss during search. Type: float
190 | | ... | - final_relative_width - Maximal width multiple of upper. Type: float
191 | | ... | - final_trial_duration - Duration of final trials [s]. Type: float
192 | | ... | - initial_trial_duration - Duration of initial trials [s]. Type: float
193 | | ... | - intermediate phases - Number of intermediate phases [1]. Type: int
194 | | ... | - timeout - Fail if search duration is longer [s]. Type: float
195 | | ... | - doublings - How many doublings to do when expanding [1]. Type: int
196 | | ...
197 | | ... | *Example:*
198 | | ...
199 | | ... | \| Find NDR and PDR intervals using optimized search \| \${64} \| \
200 | | ... | 3-node-IPv4 \| \${100000} \| \${14880952} \| \${0.005} \| \${0.005} \
201 | | ... | \| \${30.0} \| \${1.0} \| \${2} \| ${600.0} \| ${2} \|
202 | | ...
203 | | [Arguments] | ${frame_size} | ${topology_type} | ${minimum_transmit_rate}
204 | | ... | ${maximum_transmit_rate} | ${packet_loss_ratio}=${0.005}
205 | | ... | ${final_relative_width}=${0.005} | ${final_trial_duration}=${30.0}
206 | | ... | ${initial_trial_duration}=${1.0}
207 | | ... | ${number_of_intermediate_phases}=${2} | ${timeout}=${720.0}
208 | | ... | ${doublings}=${2}
209 | | ...
210 | | ${result} = | Perform optimized ndrpdr search | ${frame_size}
211 | | ... | ${topology_type} | ${minimum_transmit_rate*2}
212 | | ... | ${maximum_transmit_rate*2} | ${packet_loss_ratio}
213 | | ... | ${final_relative_width} | ${final_trial_duration}
214 | | ... | ${initial_trial_duration} | ${number_of_intermediate_phases}
215 | | ... | timeout=${timeout} | doublings=${doublings}
216 | | Display result of NDRPDR search | ${result} | ${frame_size}
217 | | Check NDRPDR interval validity | ${result.pdr_interval}
218 | | ... | ${packet_loss_ratio}
219 | | Check NDRPDR interval validity | ${result.ndr_interval}
220 | | Perform additional measurements based on NDRPDR result
221 | | ... | ${result} | ${frame_size} | ${topology_type}
222
223 | Display single bound
224 | | [Documentation]
225 | | ... | Display one bound of NDR+PDR search,
226 | | ... | in packet per seconds (total and per stream)
227 | | ... | and Gbps total bandwidth with untagged packet.
228 | | ... | Througput is calculated as:
229 | | ... | Measured rate per stream * Total number of streams
230 | | ... | Bandwidth is calculated as:
231 | | ... | (Throughput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
232 | | ... | The given result should contain latency data as well.
233 | | ...
234 | | ... | *Arguments:*
235 | | ... | - text - Flavor text describing which bound is this. Type: string
236 | | ... | - rate_total - Total (not per stream) measured Tr [pps]. Type: float
237 | | ... | - framesize - L2 Frame Size [B]. Type: integer
238 | | ... | - latency - Latency data to display if non-empty. Type: string
239 | | ...
240 | | ... | *Example:*
241 | | ...
242 | | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \
243 | | ... | \| \${64} \| show_latency=\${EMPTY} \|
244 | | ...
245 | | [Arguments] | ${text} | ${rate_total} | ${framesize} | ${latency}=${EMPTY}
246 | | ...
247 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
248 | | Set Test Message | ${\n}${text}: ${rate_total} pps, | append=yes
249 | | Set Test Message | ${bandwidth_total} Gbps (untagged) | append=yes
250 | | Return From Keyword If | not """${latency}"""
251 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] per stream: ${latency}
252 | | ... | append=yes
253
254 | Display result of NDRPDR search
255 | | [Documentation]
256 | | ... | Display result of NDR+PDR search, both quantities, both bounds,
257 | | ... | in packet per seconds (total and per stream)
258 | | ... | and Gbps total bandwidth with untagged packet.
259 | | ... | Througput is calculated as:
260 | | ... | Measured rate per stream * Total number of streams
261 | | ... | Bandwidth is calculated as:
262 | | ... | (Throughput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
263 | | ... | The given result should contain latency data as well.
264 | | ...
265 | | ... | *Arguments:*
266 | | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult
267 | | ... | - framesize - L2 Frame Size [B]. Type: integer
268 | | ...
269 | | ... | *Example:*
270 | | ...
271 | | ... | \| Display result of NDRPDR search \| \${result} \| \${64} \|
272 | | ...
273 | | [Arguments] | ${result} | ${framesize}
274 | | ...
275 | | ${framesize}= | Get Frame Size | ${framesize}
276 | | Display single bound | NDR_LOWER
277 | | ... | ${result.ndr_interval.measured_low.transmit_rate} | ${framesize}
278 | | ... | ${result.ndr_interval.measured_low.latency}
279 | | Display single bound | NDR_UPPER
280 | | ... | ${result.ndr_interval.measured_high.transmit_rate} | ${framesize}
281 | | Display single bound | PDR_LOWER
282 | | ... | ${result.pdr_interval.measured_low.transmit_rate} | ${framesize}
283 | | ... | ${result.pdr_interval.measured_low.latency}
284 | | Display single bound | PDR_UPPER
285 | | ... | ${result.pdr_interval.measured_high.transmit_rate} | ${framesize}
286
287 | Check NDRPDR interval validity
288 | | [Documentation]
289 | | ... | Extract loss ratio of lower bound of the interval.
290 | | ... | Fail if it does not reach the allowed value.
291 | | ...
292 | | ... | *Arguments:*
293 | | ... | - interval - Measured interval. Type: ReceiveRateInterval
294 | | ... | - packet_loss_ratio - Accepted loss (0.0 for NDR). Type: float
295 | | ...
296 | | ... | *Example:*
297 | | ...
298 | | ... | \| Check NDRPDR interval validity \| \${result.pdr_interval} \
299 | | ... | \| \${0.005} \|
300 | | ...
301 | | [Arguments] | ${interval} | ${packet_loss_ratio}=${0.0}
302 | | ...
303 | | ${lower_bound} = | Set Variable | ${interval.measured_low}
304 | | ${lower_bound_lf} = | Set Variable | ${lower_bound.loss_fraction}
305 | | Return From Keyword If | ${lower_bound_lf} <= ${packet_loss_ratio}
306 | | ${message}= | Catenate | SEPARATOR=${SPACE}
307 | | ... | Minimal rate loss fraction ${lower_bound_lf}
308 | | ... | does not reach target ${packet_loss_ratio}.
309 | | ${message_zero} = | Set Variable | Zero packets forwarded!
310 | | ${message_other} = | Set Variable | ${lower_bound.loss_count} packets lost.
311 | | ${message} = | Set Variable If | ${lower_bound_lf} >= 1.0
312 | | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other}
313 | | Fail | ${message}
314
315 | Perform additional measurements based on NDRPDR result
316 | | [Documentation]
317 | | ... | Perform any additional measurements which are not directly needed
318 | | ... | for determining NDR nor PDR, but which are needed for gathering
319 | | ... | additional data for debug purposes.
320 | | ... | Currently, just "Traffic should pass with no loss" is called.
321 | | ... | TODO: Move latency measurements from optimized search here.
322 | | ...
323 | | ... | *Arguments:*
324 | | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult
325 | | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
326 | | ... | - topology_type - Topology type. Type: string
327 | | ...
328 | | ... | *Example:*
329 | | ... | \| Perform additional measurements based on NDRPDR result \
330 | | ... | \| \${result} \| ${64} \| 3-node-IPv4 \|
331 | | ...
332 | | [Arguments] | ${result} | ${framesize} | ${topology_type}
333 | | ...
334 | | ${duration}= | Set Variable | 5.0
335 | | ${rate_per_stream}= | Evaluate
336 | | ... | ${result.ndr_interval.measured_low.target_tr} / 2.0
337 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
338 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
339
340 | Measure latency pps
341 | | [Documentation]
342 | | ... | Send traffic at specified rate. Measure min/avg/max latency
343 | | ...
344 | | ... | *Arguments:*
345 | | ... | - duration - Duration of traffic run [s]. Type: integer
346 | | ... | - rate - Rate for sending packets. Type: integer
347 | | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
348 | | ... | - topology_type - Topology type. Type: string
349 | | ...
350 | | ... | *Example:*
351 | | ...
352 | | ... | \| Measure latency \| 10 \| 4.0 \| 64 \| 3-node-IPv4 \|
353 | | ...
354 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
355 | | ...
356 | | Return From Keyword If | ${rate} <= 10000 | ${-1}
357 | | Send traffic on tg | ${duration} | ${rate}pps | ${framesize}
358 | | ... | ${topology_type} | warmup_time=0
359 | | Run keyword and return | Get latency
360
361 | Traffic should pass with no loss
362 | | [Documentation]
363 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
364 | | ... | evaluation.
365 | | ...
366 | | ... | *Arguments:*
367 | | ... | - duration - Duration of traffic run [s]. Type: integer
368 | | ... | - rate - Rate for sending packets. Type: string
369 | | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
370 | | ... | - topology_type - Topology type. Type: string
371 | | ... | - fail_on_loss - If True, the keyword fails if loss occurred.
372 | | ... | Type: boolean
373 | | ...
374 | | ... | *Example:*
375 | | ...
376 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
377 | | ... | \| 3-node-IPv4 \|
378 | | ...
379 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
380 | | ... | ${fail_on_loss}=${True}
381 | | ...
382 | | Send traffic at specified rate | ${duration} | ${rate} | ${framesize}
383 | | ... | ${topology_type}
384 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
385
386 | Traffic should pass with maximum rate
387 | | [Documentation]
388 | | ... | Send traffic at maximum rate.
389 | | ...
390 | | ... | *Arguments:*
391 | | ... | - rate - Rate for sending packets. Type: string
392 | | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
393 | | ... | - topology_type - Topology type. Type: string
394 | | ... | - subsamples - How many trials in this measurement. Type:int
395 | | ... | - trial_duration - Duration of single trial [s]. Type: float
396 | | ... | - fail_no_traffic - Whether to fail on zero receive count. Type: boolean
397 | | ...
398 | | ... | *Example:*
399 | | ...
400 | | ... | \| Traffic should pass with maximum rate \| 4.0mpps \| 64 \
401 | | ... | \| 3-node-IPv4 \| ${1} \| ${10.0} | ${False} \|
402 | | ...
403 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
404 | | ... | ${trial_duration}=${perf_trial_duration} | ${fail_no_traffic}=${True}
405 | | ... | ${subsamples}=${perf_trial_multiplicity}
406 | | ...
407 | | ${results} = | Send traffic at specified rate | ${trial_duration} | ${rate}
408 | | ... | ${framesize} | ${topology_type} | ${subsamples}
409 | | Set Test Message | ${\n}Maximum Receive Rate trial results
410 | | Set Test Message | in packets per second: ${results}
411 | | ... | append=yes
412 | | # TODO: Should we also report the percentage relative to transmit rate,
413 | | # so that people looking at console can decide how close to 100% it is?
414 | | Run Keyword If | ${fail_no_traffic} | Fail if no traffic forwarded
415
416 | Send traffic at specified rate
417 | | [Documentation]
418 | | ... | Send traffic at specified rate.
419 | | ... | Return list of measured receive rates.
420 | | ...
421 | | ... | *Arguments:*
422 | | ... | - trial_duration - Duration of single trial [s]. Type: float
423 | | ... | - rate - Rate for sending packets. Type: string
424 | | ... | - framesize - L2 Frame Size [B]. Type: integer/string
425 | | ... | - topology_type - Topology type. Type: string
426 | | ... | - subsamples - How many trials in this measurement. Type: int
427 | | ...
428 | | ... | *Example:*
429 | | ...
430 | | ... | \| Send traffic at specified rate \| ${1.0} \| 4.0mpps \| 64 \
431 | | ... | \| 3-node-IPv4 \| ${10} \|
432 | | ...
433 | | [Arguments] | ${trial_duration} | ${rate} | ${framesize}
434 | | ... | ${topology_type} | ${subsamples}=${1}
435 | | ...
436 | | Clear and show runtime counters with running traffic | ${trial_duration}
437 | | ... | ${rate} | ${framesize} | ${topology_type}
438 | | Run Keyword If | ${dut_stats}==${True} | Clear all counters on all DUTs
439 | | Run Keyword If | ${dut_stats}==${True} and ${pkt_trace}==${True}
440 | | ... | VPP Enable Traces On All DUTs | ${nodes}
441 | | Run Keyword If | ${dut_stats}==${True}
442 | | ... | VPP enable elog traces on all DUTs | ${nodes}
443 | | ${results} = | Create List
444 | | :FOR | ${i} | IN RANGE | ${subsamples}
445 | | | Send traffic on tg | ${trial_duration} | ${rate} | ${framesize}
446 | | | ... | ${topology_type} | warmup_time=0
447 | | | ${rx} = | Get Received
448 | | | ${rr} = | Evaluate | ${rx} / ${trial_duration}
449 | | | Append To List | ${results} | ${rr}
450 | | Run Keyword If | ${dut_stats}==${True} | Show event logger on all DUTs
451 | | ... | ${nodes}
452 | | Run Keyword If | ${dut_stats}==${True} | Show statistics on all DUTs
453 | | ... | ${nodes}
454 | | Run Keyword If | ${dut_stats}==${True} and ${pkt_trace}==${True}
455 | | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100}
456 | | Return From Keyword | ${results}
457
458 | Clear and show runtime counters with running traffic
459 | | [Documentation]
460 | | ... | Start traffic at specified rate then clear runtime counters on all
461 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
462 | | ... | on all DUTs. Finally stop traffic
463 | | ...
464 | | ... | *Arguments:*
465 | | ... | - duration - Duration of traffic run [s]. Type: integer
466 | | ... | - rate - Rate for sending packets. Type: string
467 | | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
468 | | ... | - topology_type - Topology type. Type: string
469 | | ...
470 | | ... | *Example:*
471 | | ...
472 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
473 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
474 | | ...
475 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
476 | | ...
477 | | Send traffic on tg | -1 | ${rate} | ${framesize} | ${topology_type}
478 | | ... | warmup_time=0 | async_call=${True} | latency=${False}
479 | | Run Keyword If | ${dut_stats}==${True}
480 | | ... | Clear runtime counters on all DUTs | ${nodes}
481 | | Sleep | ${duration}
482 | | Run Keyword If | ${dut_stats}==${True}
483 | | ... | Show runtime counters on all DUTs | ${nodes}
484 | | Stop traffic on tg