All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

save-current-profiler-tree

Function
Summary

Save the current profiler tree to a file.

Package

hcl

Signature

save-current-profiler-tree filename name => path

Arguments

filename

A pathname designator.

name

An object.

Values

path

A pathname.

Description

The function save-current-profiler-tree checks if filename has a type, and if not adds the type "tree". It then opens the file for writing with :if-exists :supersede and :external-format :utf-8, and writes the current profiler tree into it. name is written to the file as the name of the tree, using format with ~A.

The current profiler tree is set either when profile finishes successfully, or when stop-profiling is called with nil for its suspend argument (the default). There is only one current tree, and it is overwritten each time it is set.

The intention of the file is that you can load it into the Profiler tool in the LispWorks IDE to view its contents. However, you can also parse it yourself, or view it as a text file for simple queries.

name should be useful for you to remember what the tree is about. For example, it may be something like the result of:

(string-append "Computing this and that at "
                (date-string))

The Profiler tool displays name in the message area of the interface (at the bottom), and it is used in the History menu.

save-current-profiler-tree returns the path that was used.

The format of the file is described in Profiler tree file format.

See also

stop-profiling
profile
Profiler tree file format


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex