CMS 3D CMS Logo

Functions

Vispa::Share::Profiling Namespace Reference

Functions

def analyze

Function Documentation

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

Definition at line 11 of file Profiling.py.

Referenced by HcalDetDiagNoiseMonitor::analyze(), EcalPreshowerMonitorClient::analyze(), HLTTauDQMOfflineSource::analyze(), EcalPreshowerMonitorClient::endJob(), and HcalDetDiagLaserClient::endRun().

00012                                           :
00013     profilename=os.path.join(logDirectory,os.path.splitext(os.path.basename(filename))[0]+"_profile")
00014     cProfile.run(function,profilename)
00015     p = pstats.Stats(profilename)
00016     p.strip_dirs()
00017     p.sort_stats("cumulative")
00018     f="^(?!unittest.py)"
00019     if filter!=None:
00020         f+=filter
00021     p.print_stats(f,30)