unprofile - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Profiling : unprofile

unprofile

turn off internal profiling

 Calling Sequence unprofile(procedure, procedure, ... );

Parameters

 procedure - any valid maple procedure that has already been profiled with profile.

Description

 • The procedure unprofile alters the given profiled procedures to their original state before they were profiled.
 • If no procedures are specified, all procedures currently profiled are restored to their original state.
 • When a procedure is unprofiled, all runtime information for that procedure is lost.
 • If unprofile is successful, it returns NULL on exit.

Examples

 > fib:=proc(n) option remember; if n<2 then n else fib(n-1)+fib(n-2) end if; end proc:
 > f:=proc(x) x end proc:
 > $\mathrm{profile}\left(\mathrm{fib},f\right)$
 > $\mathrm{fib}\left(5\right)$
 ${5}$ (1)
 > $f\left(3\right),f\left(4\right)$
 ${3}{,}{4}$ (2)

Show only the specified function.

 > $\mathrm{showprofile}\left(\mathrm{fib}\right)$
 function           depth    calls     time    time%         bytes   bytes% --------------------------------------------------------------------------- fib                    5        9    0.003   100.00          6448    95.72 --------------------------------------------------------------------------- total:                 6       11    0.003   100.00          6736   100.00

Show all.

 > $\mathrm{showprofile}\left(\right)$
 function           depth    calls     time    time%         bytes   bytes% --------------------------------------------------------------------------- fib                    5        9    0.003   100.00          6448    95.72 f                      1        2    0.000     0.00           288     4.28 --------------------------------------------------------------------------- total:                 6       11    0.003   100.00          6736   100.00
 > $\mathrm{unprofile}\left(\mathrm{fib}\right)$

This produces an error, as the function is no longer being profiled.

 > $\mathrm{showprofile}\left(\mathrm{fib}\right)$

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam