2011-05-25 18:56:54 -07:00
|
|
|
import sys
|
|
|
|
import shelve
|
|
|
|
|
|
|
|
|
|
|
|
s = shelve.open(sys.argv[1])
|
|
|
|
d = dict(s)
|
|
|
|
s.close()
|
|
|
|
|
|
|
|
# {'count': 10000, 'extra': 256, 'receive': 1148.0290439128876, 'submit': 4.298105001449585, 'participants': 1, 'order': 5}
|
|
|
|
# 'tasks': defaultdict(<type 'int'>, {'m5-2-1.local-31671': 10000}),
|
|
|
|
|
|
|
|
for line in (i[1] for i in sorted(d.iteritems(), key = lambda x: x[1]['stats']['participants'])):
|
|
|
|
run = line['stats']
|
|
|
|
|
2011-05-30 21:49:24 -07:00
|
|
|
thruput = run['count'] / run['receive']
|
2011-05-25 18:56:54 -07:00
|
|
|
|
2011-05-30 21:49:24 -07:00
|
|
|
p = run['participants']
|
2011-05-25 18:56:54 -07:00
|
|
|
|
2011-05-28 12:03:16 -07:00
|
|
|
# speedup (http://en.wikipedia.org/wiki/Speedup):
|
2011-05-30 21:49:24 -07:00
|
|
|
T_1 = 0.114802904391
|
|
|
|
S_p = T_1 / (run['receive']/run['count'])
|
2011-05-25 18:56:54 -07:00
|
|
|
|
2011-05-30 21:49:24 -07:00
|
|
|
E_p = S_p / p
|
|
|
|
|
|
|
|
print p, S_p, E_p
|
2011-05-25 18:56:54 -07:00
|
|
|
|