showprofile - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

The Internal Profiler

 Calling Sequence showprofile([procedure, procedure, ...], [sortflag])

Parameters

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

Description

 • The procedure showprofile displays the runtime information collected for the specified procedures in a tabular format.
 • If no procedures are specified, all profiled procedures are displayed.
 • The optional sortflag parameter specifies how entries are sorted in the table.  Sort can consist of one of the following:

 alpha   -  sort in alphabetical order by function name ralpha   -  sort in reverse alphabetical order by function name time   -  sort by increasing amount of CPU time used rtime   -  sort by decreasing amount of CPU time used bytes   -  sort by increasing amount of storage used rbytes   -  sort by decreasing amount of storage used load   -  sort by increasing amount of bytes^2*time rload   -  sort by decreasing amount of bytes^2*time

 • If no sortflag is specified, then the default (rload) is used.
 • If showprofile 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}\right)$
 > $\mathrm{profile}\left(f\right)$
 > $\mathrm{fib}\left(5\right)$
 ${5}$ (1)
 > $f\left(10\right)$
 ${10}$ (2)
 > $\mathrm{showprofile}\left(\mathrm{fib}\right)$
 function           depth    calls     time    time%         bytes   bytes% --------------------------------------------------------------------------- fib                    5        9    0.000     0.00          6288    97.76 --------------------------------------------------------------------------- total:                 6       10    0.000     0.00          6432   100.00
 > $\mathrm{showprofile}\left(\mathrm{\alpha }\right)$
 function           depth    calls     time    time%         bytes   bytes% --------------------------------------------------------------------------- f                      1        1    0.000     0.00           144     2.24 fib                    5        9    0.000     0.00          6288    97.76 --------------------------------------------------------------------------- total:                 6       10    0.000     0.00          6432   100.00
 > $\mathrm{showprofile}\left(\mathrm{ralpha}\right)$
 function           depth    calls     time    time%         bytes   bytes% --------------------------------------------------------------------------- fib                    5        9    0.000     0.00          6288    97.76 f                      1        1    0.000     0.00           144     2.24 --------------------------------------------------------------------------- total:                 6       10    0.000     0.00          6432   100.00
 > $\mathrm{unprofile}\left(\right)$