Package PyFoam :: Package Execution :: Module AnalyzedRunner
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.Execution.AnalyzedRunner

 1  #  ICE Revision: $Id: AnalyzedRunner.py 9667 2008-11-12 18:20:16Z bgschaid $  
 2  """Command is run and output is analyzed""" 
 3   
 4  from BasicRunner import BasicRunner 
 5  from AnalyzedCommon import AnalyzedCommon 
 6   
7 -class AnalyzedRunner(AnalyzedCommon,BasicRunner):
8 """The output of a command is analyzed while being run 9 10 Side effects (files written etc) depend on the analyzer""" 11
12 - def __init__(self,analyzer, 13 argv=None, 14 silent=False, 15 logname="PyFoamSolve", 16 server=False, 17 lam=None, 18 restart=False, 19 noLog=False):
20 """ @param analyzer: the analyzer for the output 21 argv, silent, logname, server, lam, noLog - see BasicRunner""" 22 BasicRunner.__init__(self,argv,silent,logname, 23 server=server, 24 lam=lam, 25 restart=restart, 26 noLog=noLog) 27 AnalyzedCommon.__init__(self,logname,analyzer)
28
29 - def lineHandle(self,line):
30 """Not to be called: calls the analyzer for the current line""" 31 AnalyzedCommon.lineHandle(self,line) 32 BasicRunner.lineHandle(self,line)
33
34 - def lastTime(self):
35 return self.getTime()
36
37 - def firstCpuTime(self):
38 exe=self.getAnalyzer("Execution") 39 if exe==None: 40 return None 41 else: 42 return exe.timeFirst()
43
44 - def firstClockTime(self):
45 exe=self.getAnalyzer("Execution") 46 if exe==None: 47 return None 48 else: 49 return exe.clockFirst()
50
51 - def totalCpuTime(self):
52 exe=self.getAnalyzer("Execution") 53 if exe==None: 54 return None 55 else: 56 return exe.timeTotal()
57
58 - def totalClockTime(self):
59 exe=self.getAnalyzer("Execution") 60 if exe==None: 61 return None 62 else: 63 return exe.clockTotal()
64
65 - def stopHandle(self):
66 BasicRunner.stopHandle(self) 67 self.tearDown()
68