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.

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