11 from __future__
import print_function
12 from pygraph.classes.graph
import graph
22 nodes = (
'/Event',
'/Event/Rec',
'/Event/DAQ')
23 for l
in open(filename).readlines():
24 if l.find(
'StoreTracer') == 0:
25 if l.find(
'Executing Algorithm') != -1:
27 if alg
not in algs.keys():
28 algs[alg] = (order, set(), set())
31 elif l.find(
'Done with Algorithm') != -1:
33 elif l.find(
'[EventDataSvc]') != -1
and curr:
37 if obj.find(
'/Event/') == 0:
39 obj = obj.replace(
'/',
'_')
43 if l.find(
'RETRIEVE') != -1:
44 if obj
not in talg[1]:
46 elif l.find(
'REGOBJ') != -1:
47 if obj
not in talg[2]:
49 if l.find(
"TimingAuditor") != -1:
52 if algo.endswith(
"|"):
54 algo = algo.rstrip(
"|")
55 if algo
in algs.keys():
56 timing[algo] = l.split()[index]
58 for name
in algs.keys():
59 if name.startswith(algo):
60 timing[name] = l.split()[index]
63 for i, (alg, deps)
in enumerate(algs.items()):
64 if alg
in [
"PatPVOffline",
"PrsADCs"]:
66 if deps[1]
or deps[2]:
69 item
for item
in deps[1]
70 if item
not in (
"DAQ_ODIN",
71 "DAQ_RawEvent")
and item
not in deps[2]
73 outputs = [item
for item
in deps[2]]
78 "runtimes_wall": [float(timing[alg])]
80 all_algos.append(new_algo)
85 if __name__ ==
"__main__":