CMS 3D CMS Logo

Functions
Vispa.Share.Profiling Namespace Reference

Functions

def analyze (function, filename, filter=None)
 

Function Documentation

def Vispa.Share.Profiling.analyze (   function,
  filename,
  filter = None 
)

Definition at line 11 of file Profiling.py.

Referenced by FSQ::BaseHandler.BaseHandler(), GlobalTrackerMuonAlignment.CLHEP_dot(), pat::CandidateSummaryTable.initializeGlobalCache(), HLTTauDQMPathSummaryPlotter.setPathObjects(), edm::EDAnalyzer.sharedResourcesAcquirer(), edm::one::EDAnalyzerBase.sharedResourcesAcquirer(), edm::global::EDAnalyzerBase.workerType(), edm::limited::EDAnalyzerBase.workerType(), CTPPSPixelDAQMappingAnalyzer.~CTPPSPixelDAQMappingAnalyzer(), EcalDQMonitorTask.~EcalDQMonitorTask(), l1t::GtInputDump.~GtInputDump(), l1t::GtRecordDump.~GtRecordDump(), IsolatedGenParticles.~IsolatedGenParticles(), L1TGlobalSummary.~L1TGlobalSummary(), edmtest::L1TriggerScalerESAnalyzer.~L1TriggerScalerESAnalyzer(), ParticleListDrawer.~ParticleListDrawer(), edmtest::RunInfoESAnalyzer.~RunInfoESAnalyzer(), edmtest::RunSummaryESAnalyzer.~RunSummaryESAnalyzer(), SingleTopTChannelLeptonDQM.~SingleTopTChannelLeptonDQM(), SingleTopTChannelLeptonDQM_miniAOD.~SingleTopTChannelLeptonDQM_miniAOD(), TopDiLeptonOfflineDQM.~TopDiLeptonOfflineDQM(), TopSingleLeptonDQM.~TopSingleLeptonDQM(), and TopSingleLeptonDQM_miniAOD.~TopSingleLeptonDQM_miniAOD().

11 def analyze(function,filename,filter=None):
12  profilename=os.path.join(logDirectory,os.path.splitext(os.path.basename(filename))[0]+"_profile")
13  cProfile.run(function,profilename)
14  p = pstats.Stats(profilename)
15  p.strip_dirs()
16  p.sort_stats("cumulative")
17  f="^(?!unittest.py)"
18  if filter!=None:
19  f+=filter
20  p.print_stats(f,30)
21 
def analyze(function, filename, filter=None)
Definition: Profiling.py:11