@property
def execTime(self):
- return self.endExecTime - self.startExecTime
+ if ( self.endExecTime is not None ) and (self.startExecTime is not None):
+ return self.endExecTime - self.startExecTime
+ return None
@property
def fullExecTime(self):
For all ContainerLogInfo contained in listOfContainerLogInfo extract all ScriptExecInfo contained recursively
in it. This method filters all "side" executions like those positionning environment for exemple.
+ See also : ListAllExecFinishedContainIn
+
Args:
-----
allexecs = sum( [sum( [[myexec for myexec in ps] for ps in cont],[] ) for cont in listOfContainerLogInfo], [] )
return [elt for elt in allexecs if elt.get() is not None]
+def ListAllExecFinishedContainIn( listOfContainerLogInfo ):
+ """
+ For all ContainerLogInfo contained in listOfContainerLogInfo extract all ScriptExecInfo contained recursively
+ in it. This method filters all "side" executions like those positionning environment for exemple and those not finished.
+
+ See also : ListAllExecContainIn
+
+ Args:
+ -----
+
+ listOfContainerLogInfo (list<ContainerLogInfo>) : instance typically returned by salome.LogManagerLoadFromFile
+
+ Returns
+ -------
+
+ list<ScriptExecInfoDeco> : all ScriptExecInfoDeco instance contained recursively in all input ContainerLogInfo instances
+
+ """
+ beforeFiltering = ListAllExecContainIn( listOfContainerLogInfo )
+ return [elt for elt in beforeFiltering if elt.get().execTime is not None]
+
def IsExecTimeHigherThan( execInstDeco, limitDuration ):
"""
Example of Usage :