Skip to content

Commit

Permalink
Added timeout to netperf remote script
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsta committed Mar 6, 2017
1 parent 678c254 commit ee76b17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion perfkitbenchmarker/linux_benchmarks/netperf_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,13 @@ def RunNetperf(vm, benchmark_name, server_ip, num_streams):
# Run all of the netperf processes and collect their stdout
# TODO: Record start times of netperf processes on the remote machine

# Give the remote script the test length plus 5 minutes to complete
remote_cmd_timeout = FLAGS.netperf_test_length + 300
remote_script_path = '/tmp/run/%s' % REMOTE_SCRIPT
remote_cmd = '%s --netperf_cmd="%s" --num_streams=%s --port_start=%s' % \
(remote_script_path, netperf_cmd, num_streams, PORT_START)
remote_stdout, _ = vm.RemoteCommand(remote_cmd)
remote_stdout, _ = vm.RemoteCommand(remote_cmd,
timeout=remote_cmd_timeout)

# Decode stdouts, stderrs, and return codes from remote command's stdout
stdouts, stderrs, return_codes = json.loads(remote_stdout)
Expand Down

0 comments on commit ee76b17

Please sign in to comment.