6 import profile
as cProfile
9 from Vispa.Main.Directories
import logDirectory
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)
16 p.sort_stats(
"cumulative")