Skip to content

Commit 1547d96

Browse files
committed
test: Print the same formatted message before running iperf
The integration tests for rate limiter run iperf command multiple times for different configurations. Printing the same formatted message before every iperf run improves readability. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 9d7bb2d commit 1547d96

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integration_tests/performance/test_rate_limiter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _check_tx_rate_limiting(test_microvm):
144144

145145
# First step: get the transfer rate when no rate limiting is enabled.
146146
# We are receiving the result in KBytes from iperf.
147-
print("Run guest TX iperf with no rate-limit")
147+
print("Run guest TX iperf for no rate limiting")
148148
rate_no_limit_kbps = _get_tx_bandwidth_with_duration(
149149
test_microvm, eth0.host_ip, IPERF_TRANSMIT_TIME
150150
)
@@ -160,11 +160,12 @@ def _check_tx_rate_limiting(test_microvm):
160160
assert _get_percentage_difference(rate_no_limit_kbps, expected_kbps) > 100
161161

162162
# Second step: check bandwidth when rate limiting is on.
163+
print("Run guest TX iperf for rate limiting without burst")
163164
_check_tx_bandwidth(test_microvm, eth1.host_ip, expected_kbps)
164165

165166
# Third step: get the number of bytes when rate limiting is on and there is
166167
# an initial burst size from where to consume.
167-
print("Run guest TX iperf with exact burst size")
168+
print("Run guest TX iperf for rate limiting with burst")
168169
# Use iperf to obtain the bandwidth when there is burst to consume from,
169170
# send exactly BURST_SIZE packets.
170171
iperf_cmd = "{} -c {} -n {} -f KBytes -w {} -N".format(
@@ -192,7 +193,7 @@ def _check_rx_rate_limiting(test_microvm):
192193

193194
# First step: get the transfer rate when no rate limiting is enabled.
194195
# We are receiving the result in KBytes from iperf.
195-
print("Run guest RX iperf with no rate-limit")
196+
print("Run guest RX iperf with no rate limiting")
196197
rate_no_limit_kbps = _get_rx_bandwidth_with_duration(
197198
test_microvm, eth0.guest_ip, IPERF_TRANSMIT_TIME
198199
)
@@ -208,11 +209,12 @@ def _check_rx_rate_limiting(test_microvm):
208209
assert _get_percentage_difference(rate_no_limit_kbps, expected_kbps) > 100
209210

210211
# Second step: check bandwidth when rate limiting is on.
212+
print("Run guest RX iperf for rate limiting without burst")
211213
_check_rx_bandwidth(test_microvm, eth1.guest_ip, expected_kbps)
212214

213215
# Third step: get the number of bytes when rate limiting is on and there is
214216
# an initial burst size from where to consume.
215-
print("Run guest RX iperf with exact burst size")
217+
print("Run guest RX iperf for rate limiting with burst")
216218
# Use iperf to obtain the bandwidth when there is burst to consume from,
217219
# send exactly BURST_SIZE packets.
218220
iperf_cmd = "{} {} -c {} -n {} -f KBytes -w {} -N".format(

0 commit comments

Comments
 (0)