1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
* Copyright (C) ????-2008 - INRIA
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="plotprofile">
15
<pubdate>$LastChangedDate$</pubdate>
18
<refname>plotprofile</refname>
19
<refpurpose> extracts and displays execution profiles
20
of a Scilab function</refpurpose>
23
<title>Calling Sequence</title>
24
<synopsis>plotprofile(fun)</synopsis>
27
<title>Parameters</title>
32
<para>a Scilab compiled function, or a function name (string), or an array of
39
<title>Description</title>
41
To use <literal>plotprofile</literal>, the Scilab function must have been prepared for
42
profiling (see exec).</para>
44
When such a function is executed, the system
45
counts how many times each line is executed and how much cpu time is
46
spent executing each line. This data is stored within the
47
function data structure. The function <literal>plotprofile</literal> in an interactive
48
command which displays this results in a graphic window. When a line
49
is clicked, the source of the function is displayed with the selected line
52
NOTE: you have to click on the "Exit" item in the graphics windows to
53
exit from "plotprofile".</para>
55
The function code is regenerated with <literal>fun2string</literal> and dumped into
56
a temporary file.</para>
59
<title>Examples</title>
60
<programlisting role="example"><![CDATA[
61
//define a function and prepare it for profiling
62
deff('x=foo(n)',['if n==0 then'
67
' s=svd(rand(n+10,n+10))'
74
//get execution profiles
75
plotprofile(foo) // click on Exit to exit
79
<title>See Also</title>
80
<simplelist type="inline">
82
<link linkend="profile">profile</link>
85
<link linkend="showprofile">showprofile</link>
88
<link linkend="fun2string">fun2string</link>