Scieneer Common Lisp 1.3.9 online documentation

Profiler


Profiler

profile:profile &rest names[Macro]

profile name*

Wraps profiling code around the named functions. As in trace, the names are not evaluated. If a function is already profiled, then unprofile and reprofile - useful to notice function redefinition. If a name is undefined, then we give a warning and ignore it. If :callers t appears, subsequent names have counts of the most common calling functions recorded. See also profile:unprofile, profile:report-time and profile:reset-time.

profile:profile-all &key package callers-p[Function]

Wraps profiling code around all functions in package, which defaults to *package*. If a function is already profiled, then unprofile and reprofile - useful to notice function redefinition. If a name is undefined, then we give a warning and ignore it. If callers-p is t names have counts of the most common calling functions recorded. See also profile:unprofile, profile:report-time, and profile:reset-time.

profile:unprofile &rest names[Macro]

Unwraps the profiling code around the named functions. names defaults to the list of all currently profiled functions.

profile:report-time &rest names[Macro]

Reports the time spent in the named functions. names defaults to the list of all currently profiled functions. The default ordering of the rows is by total time per function, by it is also possible to order the rows by the amount of consing per function, see profile:*report-order*. Functions that are not called are not tabulated, but are listed, and are also stored in the profile:*functions-not-called* list. The listing of not called functions is inhibited if there are more than the profile:*report-not-called-limit* not called functions.

profile:reset-time &rest names[Macro]

Resets the time counter for the named functions. names defaults to the list of all currently profiled functions.

profile:*functions-not-called*[Variable]

A list of profiled functions which were not called.

profile:*report-order*[Variable]

The key used by profile:report-time to order the rows; either :time or :space.

profile:*report-not-called-limit*[Variable]

The maximum number of not called functions that will be reported by profile:report-time. When nil all not called functions are repored.

profile:*timed-functions*[Variable]

List of functions that are currently being timed.