feat(telemetry): T-Rex runtime
[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=vpp_runtime.yaml
98 | | Stop traffic on tg
99
100 | Additional Statistics Action For vpp-runtime-iperf3
101 | | [Documentation]
102 | | ... | Additional Statistics Action for clear and show runtime counters with
103 | | ... | iPerf3 running traffic.
104 | |
105 | | ... | See documentation of the called keyword for required test variables.
106 | |
107 | | ${runtime_duration} = | Get Runtime Duration
108 | | ${pids}= | iPerf Client Start Remote Exec
109 | | | ... | ${nodes['${iperf_client_node}']}
110 | | | ... | duration=${-1}
111 | | | ... | rate=${None}
112 | | | ... | frame_size=${None}
113 | | | ... | async_call=True
114 | | | ... | warmup_time=0
115 | | | ... | traffic_directions=${1}
116 | | | ... | namespace=${iperf_client_namespace}
117 | | | ... | udp=${iperf_client_udp}
118 | | | ... | host=${iperf_server_bind}
119 | | | ... | bind=${iperf_client_bind}
120 | | | ... | affinity=${iperf_client_affinity}
121 | | Run Telemetry On All DUTs
122 | | ... | ${nodes} | profile=vpp_runtime.yaml
123 | | iPerf Client Stop Remote Exec | ${nodes['${iperf_client_node}']} | ${pids}
124
125 | Additional Statistics Action For noop
126 | | [Documentation]
127 | | ... | Additional Statistics Action for no operation.
128 | |
129 | | No operation
130
131 | Additional Statistics Action For vpp-clear-stats
132 | | [Documentation]
133 | | ... | Additional Statistics Action for clear VPP statistics.
134 | |
135 | | Run Telemetry On All DUTs
136 | | ... | ${nodes} | profile=vpp_clear_stats.yaml
137
138 | Additional Statistics Action For vpp-enable-packettrace
139 | | [Documentation]
140 | | ... | Additional Statistics Action for enable VPP packet trace.
141 | |
142 | | Run Keyword If | ${extended_debug}==${True}
143 | | ... | VPP Enable Traces On All DUTs | ${nodes} | fail_on_error=${False}
144
145 | Additional Statistics Action For vpp-show-packettrace
146 | | [Documentation]
147 | | ... | Additional Statistics Action for show VPP packet trace.
148 | |
149 | | Run Keyword If | ${extended_debug}==${True}
150 | | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100}
151
152 | Additional Statistics Action For vpp-show-stats
153 | | [Documentation]
154 | | ... | Additional Statistics Action for show VPP statistics.
155 | |
156 | | Run Telemetry On All DUTs
157 | | ... | ${nodes} | profile=vpp_show_stats.yaml