profiling - can profilehooks, write .prof files? -


i write profilehooks output .prof file. in order convert file qcachgrind file , visualize profiling results. (i can't use cprofile cprofile, not profile code)

its not on web, documentation says:

profile(fn=none, skip=0, filename=none, immediate=false, dirs=false, sort=none, entries=40, profiler=('cprofile', 'profile', 'hotshot'), stdout=true)     mark `fn` profiling.      if `skip` > 0, first `skip` calls `fn` not profiled.      if `immediate` false, profiling results printed     sys.stdout on program termination.  otherwise results printed     after each call.  (if don't want this, set stdout=false , specify     `filename` store profile data.)      if `dirs` false name of file printed.     otherwise full path used.      `sort` can list of sort keys (defaulting ['cumulative',     'time', 'calls']).  following ones recognized::          'calls'      -- call count         'cumulative' -- cumulative time         'file'       -- file name         'line'       -- line number         'module'     -- file name         'name'       -- function name         'nfl'        -- name/file/line         'pcalls'     -- call count         'stdname'    -- standard name         'time'       -- internal time      `entries` limits output first n entries.      `profiler` can used select preferred profiler, or specify     sequence of them, in order of preference.  default ('cprofile'.     'profile', 'hotshot').      if `filename` specified, profile stats stored in     named file.  can load them pstats.stats(filename) or use     visualization tool runsnakerun.      usage::          def fn(...):             ...         fn = profile(fn, skip=1)      if using python 2.4, should able use decorator     syntax::          @profile(skip=3)         def fn(...):             ...      or ::          @profile         def fn(...):             ... 

Comments