1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
6
<TYPE>Scilab Function</TYPE>
8
<SHORT_DESCRIPTION name="profile"> extract execution profiles of a Scilab function</SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>c=profile(fun) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>fun</PARAM_NAME>
17
<SP>: a Scilab function</SP>
21
<PARAM_NAME>c</PARAM_NAME>
23
<SP>: a nx3 matrix containig the execution profiles</SP>
30
To use <VERB>profile</VERB> the Scilab function must have been prepared for
31
profiling (see getf).</P>
33
For such function, When such a function is executed the systems counts
34
how many time each line is executed and how may cpu time is spend for
35
each line execution. These data are stored within the function data
36
structure. The profile function allows to extract these data and
37
return them in the two first columns of <VERB>c</VERB>. The <VERB>c</VERB> third
38
column gives a measure of interpetor effort for one execution of
39
corresponding line. Ith line of <VERB>c</VERB> corresponds to Ith line of the
40
function (included first)</P>
42
Note that, due to the precision of the processor clock (typically one
43
micro second), some executed lignes may appear with 0 cpu time even if
44
total cpu time really spend in their execution is large.</P>
48
//define function and prepare it for profiling
49
deff('x=foo(n)',['if n==0 then'
54
' s=svd(rand(n+10,n+10))'
60
//get execution profiles
64
profile(foo) //execution profiles are cumulated
75
<LINK>plotprofile</LINK>
78
<LINK>showprofile</LINK>