CodeTools[Profiling] - Maple Programming Help

Home : Support : Online Help : Programming : Profiling : CodeTools[Profiling] : CodeTools/Profiling/Ignore

CodeTools[Profiling]

 Ignore
 mark procedures and modules that should not be profiled

 Calling Sequence Ignore(name)

Parameters

 name - name of a function or module to be ignored

Description

 • The Ignore(name) command marks procedures and modules specifying that they are not profiled by calls to Profile.
 • A module or procedure that has been marked by Ignore can be unmarked using the Allow command.
 • If called with a module, the procedures in that module and in its submodules are ignored.  These procedures inherit this behavior from the module, therefore, individual functions in an ignored module cannot be allowed. For more information, see Allow.

Examples

 > $\mathrm{with}\left(\mathrm{CodeTools}[\mathrm{Profiling}]\right):$
 > a := proc() return "a" end proc;
 ${a}{≔}{\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{return}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{"a"}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (1)
 > b := proc() return "b" end proc;
 ${b}{≔}{\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{return}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{"b"}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (2)
 > $\mathrm{Ignore}\left(a\right)$
 > $\mathrm{Profile}\left(\right)$
 > $a\left(\right):$
 > $b\left(\right):$
 > $\mathrm{PrintProfiles}\left(a\right)$
 > $\mathrm{PrintProfiles}\left(b\right)$
 b b := proc()      |Calls Seconds  Words| PROC |    1   0.000      0|    1 |    1   0.000      0| return "b" end proc
 > $\mathrm{UnProfile}\left(\right)$
 > $\mathrm{Profile}\left(a\right)$
 > $\mathrm{Allow}\left(a\right)$
 > $\mathrm{Profile}\left(\right)$
 > $a\left(\right):$
 > $b\left(\right):$
 > $\mathrm{PrintProfiles}\left(a\right)$
 a a := proc()      |Calls Seconds  Words| PROC |    1   0.000      0|    1 |    1   0.000      0| return "a" end proc
 > $\mathrm{PrintProfiles}\left(b\right)$
 b b := proc()      |Calls Seconds  Words| PROC |    1   0.000      0|    1 |    1   0.000      0| return "b" end proc
 >