| OLD | NEW |
| 1 import time | 1 import time |
| 2 | 2 |
| 3 ssh_hosts = [hosts.create_host(m, initialize=False) for m in machines] | 3 ssh_hosts = [hosts.create_host(m, initialize=False) for m in machines] |
| 4 at_hosts = [autotest.Autotest(h) for h in ssh_hosts] | 4 at_hosts = [autotest.Autotest(h) for h in ssh_hosts] |
| 5 | 5 |
| 6 | 6 |
| 7 def add_profilers(at, profilers, timeout_sync, timeout_start, timeout_stop, | 7 def add_profilers(at, profilers, timeout_sync, timeout_start, timeout_stop, |
| 8 machines, name): | 8 machines, name): |
| 9 control_file = [] | 9 control_file = [] |
| 10 for profiler in profilers: | 10 for profiler in profilers: |
| 11 control_file.append("job.profilers.add(%s)" | 11 control_file.append("job.profilers.add(%s)" |
| 12 % str(profiler)[1:-1]) | 12 % str(profiler)[1:-1]) |
| 13 | 13 |
| 14 control_file.append(("job.run_test('barriertest', timeout_sync=%d, " | 14 control_file.append(("job.run_test('profiler_sync', timeout_sync=%d, " |
| 15 "timeout_start=%d, timeout_stop=%d, " | 15 "timeout_start=%d, timeout_stop=%d, " |
| 16 "hostid='%s', masterid='%s', all_ids=%s)") | 16 "hostid='%s', masterid='%s', all_ids=%s)") |
| 17 % (timeout_sync, timeout_start, timeout_stop, | 17 % (timeout_sync, timeout_start, timeout_stop, |
| 18 at.host.hostname, "PROF_MASTER", str(machines))) | 18 at.host.hostname, "PROF_MASTER", str(machines))) |
| 19 | 19 |
| 20 for profiler in profilers: | 20 for profiler in profilers: |
| 21 control_file.append("job.profilers.delete('%s')" % profiler[0]) | 21 control_file.append("job.profilers.delete('%s')" % profiler[0]) |
| 22 | 22 |
| 23 params = ["\n".join(control_file), "profile-" + profiler[0], at.host] | 23 params = ["\n".join(control_file), "profile-" + profiler[0], at.host] |
| 24 return subcommand(at.run, params, name) | 24 return subcommand(at.run, params, name) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 tests = [subcommand(server_sleep_test, [20], "server_sleep_test")] | 61 tests = [subcommand(server_sleep_test, [20], "server_sleep_test")] |
| 62 for at in at_hosts: | 62 for at in at_hosts: |
| 63 name = "profiled-%s" % at.host.hostname | 63 name = "profiled-%s" % at.host.hostname |
| 64 tests.append(add_profilers(at, profilers, timeout_sync, | 64 tests.append(add_profilers(at, profilers, timeout_sync, |
| 65 timeout_start, timeout_stop, machines, name)) | 65 timeout_start, timeout_stop, machines, name)) |
| 66 parallel(tests) | 66 parallel(tests) |
| 67 | 67 |
| 68 | 68 |
| 69 main() | 69 main() |
| OLD | NEW |