def preappendFreestyle(self, value):
self._freestyle_log = value + self._freestyle_log
+ def appendFreestyle(self, value):
+ self._freestyle_log += value
+
@property
def measureTimeResolution(self):
return self._measure_time_resolution_ms
self.addTimeInfoOnLevel2("startExecTime")
##
self.addInfoOnLevel2("measureTimeResolution",self.my_container_py.monitoringtimeresms())
+ self._current_execution_session.finalizeAndPushToMaster() # flush it to the server (scheduler hosting ContainerManager) in order to retrieve it in Python server
cpumeminfo, self._current_execution_session._current_instance = executeSecondInternal( self.my_container_py.monitoringtimeresms() )
##
self.addInfoOnLevel2("CPUMemDuringExec",cpumeminfo)
:param alreadyOnSiteBytes: pickle of instance of ScriptExecInfo of previous value (if any) [bytes]
:param instanceRemoteBytes: pickle of current instance of ScriptExecInfo (if any) [bytes]
"""
+ instanceRemote = pickle.loads(instanceRemoteBytes)
alreadyOnSite = None
if len( alreadyOnSiteBytes ) > 0:
alreadyOnSite = pickle.loads(alreadyOnSiteBytes)
- instanceRemote = pickle.loads(instanceRemoteBytes)
self._stop_pos = os.path.getsize( self.father.father.logfilename )
- setattr(instanceRemote,"tracePosStop",self._stop_pos)
- setattr(instanceRemote,"tracePosStart",self._start_pos)
if alreadyOnSite:
- instanceRemote.preappendFreestyle( alreadyOnSite._freestyle_log )
- return pickle.dumps(instanceRemote)
+ setattr(alreadyOnSite,"tracePosStop",self._stop_pos)
+ setattr(alreadyOnSite,"tracePosStart",self._start_pos)
+ alreadyOnSite.appendFreestyle( instanceRemote._freestyle_log )
+ return pickle.dumps(alreadyOnSite)
+ else:
+ setattr(instanceRemote,"tracePosStop",self._stop_pos)
+ setattr(instanceRemote,"tracePosStart",self._start_pos)
+ return pickle.dumps(instanceRemote)
def start(self):
self._start_pos = os.path.getsize( self.father.father.logfilename )
logInfoForCont = [elt for elt in a if "container_crash_test_5" in elt.ns_entry]
self.assertEqual( len(logInfoForCont), 1 )
logInfoForCont = logInfoForCont[0]
+ self.assertTrue( logInfoForCont[1][0].startExecTime is not None )
self.assertEqual( [elt[0] for elt in logInfoForCont[1][0].get().freestyle] , ['b4loadctx', 'afterloadctx', 'bforeexec', 'b4loadctx', 'afterloadctx', 'bforeexec', 'afterexec', 'strtdumpout', 'afterdump'] ) # <- aim of test is here. First 3 entries ('b4loadctx', 'afterloadctx', 'bforeexec') prove that first attempt fails to return within 10 sececonds as requested by KernelBasis.SetExecutionTimeOut(10)
pass
pass