You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
404 B

import time
import random
print "--SELFTEST-- loading test"
max = 40
def payload1(id):
print "--STEPTEST-- payload1 start"
time.sleep(random.randint(1, 5))
b = job.barrier('127.0.0.1#P%d' % (id), 'here', 60)
b.rendezvous(*us)
print "--STEPTEST-- payload1 complete"
us = []
jobs = []
for n in range(1, max+1):
us.append('127.0.0.1#P%d' % (n))
jobs.append([payload1, n])
job.parallel(*jobs)