the 'submit' script now times and reports things correctly
This commit is contained in:
parent
3f4785ef49
commit
4fd0780442
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
import time
|
||||
|
||||
@ -34,12 +35,11 @@ def run_queries(count, order = 3, extra_points = 8):
|
||||
|
||||
if __name__ == '__main__':
|
||||
server = 'localhost'
|
||||
expected_participants = 6
|
||||
|
||||
m = QueueManager(address=(server, 50000), authkey='asdf')
|
||||
m.connect()
|
||||
|
||||
count = int(sys.argv[1])
|
||||
expected_participants, count = (int(i) for i in sys.argv[1:])
|
||||
|
||||
inq = m.get_inqueue()
|
||||
outq = m.get_outqueue()
|
||||
@ -49,14 +49,17 @@ if __name__ == '__main__':
|
||||
print outq.get()
|
||||
|
||||
# run codes
|
||||
r, submit, receive = run_queries(count, order=3, extra_points = 64)
|
||||
results, submit, receive = run_queries(count, order=3, extra_points = 64)
|
||||
|
||||
# shut down all participants
|
||||
for i in xrange(expected_participants):
|
||||
inq.put([None] * expected_participants)
|
||||
inq.put([None] * 4)
|
||||
|
||||
results = {}
|
||||
results['submit' ] = float(submit)
|
||||
results['receive'] = float(receive)
|
||||
stats = {}
|
||||
stats['submit' ] = float(submit)
|
||||
stats['receive' ] = float(receive)
|
||||
stats['count' ] = count
|
||||
stats['expected_participants'] = expected_participants
|
||||
|
||||
print "submit time: %(submit)0.2f seconds, results time: %(receive)0.2f" % results
|
||||
log.error(results)
|
||||
print "submit time for %(count)s interps, %(expected_participants)d participants: %(submit)0.2f seconds, results time: %(receive)0.2f" % stats
|
||||
log.error("stats: %s", stats)
|
||||
|
Loading…
Reference in New Issue
Block a user