OOF2: The Manual

Name

OOF.Help.Debug.Profile.Start — Begin measuring execution time.

Synopsis

OOF.Help.Debug.Profile.Start(filename,fudge)

Details

  • Parent Menu: OOF.Help.Debug.Profile
  • Callback: function profile_start in module ooflib.common.IO.mainmenu
  • Parameters:

    filename
    File name. Type: A character string.
    fudge
    Fudge factor. Type: A real number.

Description

Profiling is the process of measuring how slow a program is. The OOF2 profiler measures time spent in Python routines.

filename is the name of a file where the profiling data will be stored. This data is not in a human readable form. After profiling is complete, view the file with the gfxprof.py python script, which may be found in the SRC/common/EXTRA subdirectory of the OOF2 source code.

fudge is a measure of how much time is spent in the internal workings of the profiling machinery, rather than in the code that's being profiled. The correct value varies from computer to computer. Use OOF.Help.Debug.Profile.FudgeFinder to estimate the value.

The OOF2 profiling code is based on the Python profiler. When the OOF2 profiler was written, the Python profiler did not handle excepctions correctly. The OOF2 profiler measures elapsed time, not cpu time, on the theory that elapsed time is what really matters, and because the granlarity on cpu time measurements is too coarse.