blob: fd64889ea011738a075323a6b06f2067ec761a14 [file] [log] [blame]
mblighedf430c2006-04-23 06:52:09 +00001# This is rough pseudocode. IT WILL NOT WORK. BE NOT SUPRISED!
2
3import os
4from autotest_utils import *
5from error import *
6
7class profiler:
8 list = [] # err, I think i can do that. maybe
9
10 def add(self, profiler):
11 sys.path.insert(0, job.profdir + '/' + profiler)
12 exec 'import ' + profiler
13 exec 'myprofiler = %s.%s(self)' % (profiler, profiler)
14 myprofiler.name = profiler
15 list.append(myprofiler)
16
17
18 def del(self, profiler):
19 nukeme = None
20 for p in list:
21 if (p.name == profiler):
22 nukeme = i
23 list.remove(i)
24
25
26 def start(self):
27 for p in list:
28 p.start()
29
30
31 def stop(self):
32 for p in list:
33 p.start()
34
35
36 def report(self):
37 for p in list:
38 p.report()
39
40