5 from PerfMonComps.PerfMonCompsConf
import PerfMonMTSvc
as _PerfMonMTSvc
9 def __init__(self, name = "PerfMonMTSvc", **kwargs):
12 super( PerfMonMTSvc, self ).
__init__( **kwargs )
19 from PerfMonComps.PerfMonFlags
import jobproperties
22 if not jobproperties.PerfMonFlags.doMonitoringMT():
26 if not isinstance(handle, PerfMonMTSvc):
30 from AthenaCommon.AppMgr
import theApp
31 theApp.AuditAlgorithms =
True
32 theApp.AuditTools =
True
33 theApp.AuditServices =
True
35 from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
37 if hasattr(handle,
"getFullJobOptName") :
38 handleName = handle.getFullJobOptName()
39 if handleName
not in theApp.CreateSvc:
41 theApp.CreateSvc = [ handleName ] + theApp.CreateSvc
44 handle.jsonFileName = jobproperties.PerfMonFlags.OutputJSON()
48 handle.wallTimeOffset = psutil.Process(os.getpid()).create_time() * 1000
51 from AthenaCommon.ConcurrencyFlags
import jobproperties
as jp
52 handle.numberOfThreads =
max(1,jp.ConcurrencyFlags.NumThreads())
53 handle.numberOfSlots =
max(1,jp.ConcurrencyFlags.NumConcurrentEvents())
56 if not hasattr(svcMgr,
'AuditorSvc'):
57 from GaudiCommonSvc.GaudiCommonSvcConf
import AuditorSvc
58 svcMgr += AuditorSvc()
61 if jobproperties.PerfMonFlags.doFullMonMT():
62 handle.doComponentLevelMonitoring =
True