~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/fr/functions/profile.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<MAN>
 
4
  <LANGUAGE>eng</LANGUAGE>
 
5
  <TITLE>profile</TITLE>
 
6
  <TYPE>Scilab Function</TYPE>
 
7
  <DATE>july 2000</DATE>
 
8
  <SHORT_DESCRIPTION name="profile"> extract execution profiles of a Scilab function</SHORT_DESCRIPTION>
 
9
  <CALLING_SEQUENCE>
 
10
    <CALLING_SEQUENCE_ITEM>c=profile(fun)  </CALLING_SEQUENCE_ITEM>
 
11
  </CALLING_SEQUENCE>
 
12
  <PARAM>
 
13
    <PARAM_INDENT>
 
14
      <PARAM_ITEM>
 
15
        <PARAM_NAME>fun</PARAM_NAME>
 
16
        <PARAM_DESCRIPTION>
 
17
          <SP>: a Scilab function</SP>
 
18
        </PARAM_DESCRIPTION>
 
19
      </PARAM_ITEM>
 
20
      <PARAM_ITEM>
 
21
        <PARAM_NAME>c</PARAM_NAME>
 
22
        <PARAM_DESCRIPTION>
 
23
          <SP>: a nx3 matrix containig the execution profiles</SP>
 
24
        </PARAM_DESCRIPTION>
 
25
      </PARAM_ITEM>
 
26
    </PARAM_INDENT>
 
27
  </PARAM>
 
28
  <DESCRIPTION>
 
29
    <P>
 
30
    To use <VERB>profile</VERB> the Scilab function must have been prepared for
 
31
    profiling (see getf).</P>
 
32
    <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>
 
41
    <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>
 
45
  </DESCRIPTION>
 
46
  <EXAMPLE>
 
47
<![CDATA[
 
48
//define function and prepare it for profiling
 
49
deff('x=foo(n)',['if n==0 then'
 
50
                 '  x=[]'
 
51
                 'else'
 
52
                 '  x=0'
 
53
                 '  for k=1:n'
 
54
                 '    s=svd(rand(n+10,n+10))'
 
55
                 '    x=x+s(1)'
 
56
                 '  end'
 
57
                 'end'],'p')
 
58
//call the function
 
59
foo(10)
 
60
//get execution profiles
 
61
profile(foo)
 
62
//call the function
 
63
foo(20)
 
64
profile(foo) //execution profiles are cumulated
 
65
 ]]>
 
66
  </EXAMPLE>
 
67
  <SEE_ALSO>
 
68
    <SEE_ALSO_ITEM>
 
69
      <LINK>getf</LINK>
 
70
    </SEE_ALSO_ITEM>
 
71
    <SEE_ALSO_ITEM>
 
72
      <LINK>deff</LINK>
 
73
    </SEE_ALSO_ITEM>
 
74
    <SEE_ALSO_ITEM>
 
75
      <LINK>plotprofile</LINK>
 
76
    </SEE_ALSO_ITEM>
 
77
    <SEE_ALSO_ITEM>
 
78
      <LINK>showprofile</LINK>
 
79
    </SEE_ALSO_ITEM>
 
80
  </SEE_ALSO>
 
81
</MAN>