From f5d37c4fb3ed984fc9f434e18d960ee3c5e021da Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Tue, 7 May 2024 11:30:10 -0700 Subject: [PATCH] Fix netstack_benchmark tests for internal dashboards. PiperOrigin-RevId: 631491956 --- test/benchmarks/tcp/tcp_benchmark.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/benchmarks/tcp/tcp_benchmark.sh b/test/benchmarks/tcp/tcp_benchmark.sh index 11225ccfe..236c531df 100755 --- a/test/benchmarks/tcp/tcp_benchmark.sh +++ b/test/benchmarks/tcp/tcp_benchmark.sh @@ -34,6 +34,7 @@ iperf_version_arg= # various changes in the kind of link available. client=false server=false +linux_client=false verbose=false gso=0 swgso=false @@ -71,6 +72,9 @@ while [[ $# -gt 0 ]]; do --client) client=true ;; + --linux_client) + linux_client=true + ;; --client_tcp_probe_file) shift netstack_opts="${netstack_opts} -client_tcp_probe_file=$1" @@ -216,6 +220,7 @@ while [[ $# -gt 0 ]]; do echo " --help show this message" echo " --verbose verbose output" echo " --client use netstack as the client" + echo " --linux-client print client stats in linux case" echo " --ideal reset all network emulation" echo " --server use netstack as the server" echo " --mtu set the mtu (bytes)" @@ -484,8 +489,10 @@ fi if ${client}; then echo "BenchmarkTCP/role=client/host-gso=\$hostgso/host-gro=\$hostgro 1 \$mbits Mb/s \$client_cpu_load cpu-time" -elif ${server}; then - echo "BenchmarkTCP/role=server/host-gso=\$hostgso/host-gro=\$hostgro 1 \$mbits Mb/s \$server_cpu_load cpu-time" + exit 0 +elif ${linux_client}; then + echo "BenchmarkTCP/role=client/host-gso=\$hostgso/host-gro=\$hostgro 1 \$mbits Mb/s \$client_cpu_load cpu-time" + exit 0 fi - +echo "BenchmarkTCP/role=server/host-gso=\$hostgso/host-gro=\$hostgro 1 \$mbits Mb/s \$server_cpu_load cpu-time" EOF