SPIDER Profiling and Coverage
SICStus Prolog 4.2.0 introduces new
functionality for profiling and source code coverage analysis. This
information can be presented in
SPIDER, using new Profile and Coverage views available from the
SICStus menu.
The following steps should be taken in order to collect and present
the profiling and source code coverage information.
- Compile, or consult, your code with source info enabled. Source
info is enabled by default when running SICStus in SPIDER. Source
info can be enabled with set_prolog_flag(source_info, on)
and disabled with set_prolog_flag(source_info, off).
- Run your code with profiling enabled. It may be a good idea to
turn off profiling when uninteresting code is run. A typical way to
profile a goal bench(10) would be to
use set_prolog_flag(profiling, on), bench(10),
set_prolog_flag(profiling, off).
- Open the Profile view, or the Code Coverage view, from the SICStus
menu. You can move these views around if you want to see them both
and to prevent them from obscuring the Prolog toplevel.
You can refresh the views, using the refresh button, if you want
them to present new profile/coverage information.
Send feedback on SPIDER.