From: Anthony Geay Date: Sun, 28 Jan 2024 20:29:59 +0000 (+0100) Subject: [EDF29150] : WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2e7bfedafc1b17e73815a36b1a787062118d6b66;p=modules%2Fkernel.git [EDF29150] : WIP --- diff --git a/src/Container/SALOME_ContainerHelper.py b/src/Container/SALOME_ContainerHelper.py index 340746fd2..9cbc00089 100644 --- a/src/Container/SALOME_ContainerHelper.py +++ b/src/Container/SALOME_ContainerHelper.py @@ -199,6 +199,10 @@ class ScriptExecInfo: @property def execTime(self): return self.endExecTime - self.startExecTime + + @property + def fullExecTime(self): + return self.endOutputTime - self.startInputTime @property def startOutputTime(self): @@ -231,7 +235,7 @@ class ScriptExecInfo: def __str__(self): CPUMemDuringExecForStr = self.CPUMemDuringExecStr if len( CPUMemDuringExecForStr ) > 30: - CPUMemDuringExecForStr = "{} ...".format( str(CPUMemDuringExecForStr) ) + CPUMemDuringExecForStr = "{} ...".format( str(CPUMemDuringExecForStr[:30]) ) else: CPUMemDuringExecForStr = str( CPUMemDuringExecForStr ) return """start exec time = {self.startExecTime} @@ -327,6 +331,10 @@ class ScriptExecInfoDeco: @property def execTime(self): return self.get().execTime + + @property + def fullExecTime(self): + return self.get().fullExecTime @property def startOutputTime(self): @@ -623,7 +631,7 @@ def unserializeLogManager(structData): def ListAllExecContainIn( listOfContainerLogInfo ): """ For all ContainerLogInfo contained in listOfContainerLogInfo extract all ScriptExecInfo contained recursively - in it. + in it. This method filters all "side" executions like those positionning environment for exemple. Args: ----- @@ -636,7 +644,8 @@ def ListAllExecContainIn( listOfContainerLogInfo ): list : all ScriptExecInfoDeco instance contained recursively in all input ContainerLogInfo instances """ - return sum( [sum( [[myexec for myexec in ps] for ps in cont],[] ) for cont in listOfContainerLogInfo], [] ) + 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 IsExecTimeHigherThan( execInstDeco, limitDuration ): """