<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.2800.1644" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff size=2>Hi
Samuel,</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff size=2>Thanks
for your suggestions.</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff size=2>Yes, I
used tic() and toc(). They showed 15 seconds (which agrees with what I see
on a clock).</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff size=2>I
don't think multiplying the number of executions (column 1) by the time (column
2) would be right. If I double the number of loops in my test program,
then I see both column 1 and column 2 values are doubled. In this case,
the time is 30 seconds, and the total of column 2 is 0.030.</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff size=2>I
think this may just be a bug in Scilab. I notice that the function
etime.sci (used by tic() and toc() ) has a scale factor of 1e3, because the
times reported by getdate end up with milliseconds. The function
profile.sci ends with a division by 1000000. Maybe this is the
problem?</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff size=2>I will
report this on the Bugzilla. If nobody else knows about this, I will just
multiply my profile times by 1000, as that seems to give the right
answers.</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2>Mike.</FONT></SPAN></DIV>
<DIV><SPAN class=923062119-15022010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Samuel Gougeon
[mailto:Samuel.Gougeon@univ-lemans.fr]<BR><B>Sent:</B> 15 February 2010
18:21<BR><B>To:</B> users@lists.scilab.org<BR><B>Subject:</B> Re:
[scilab-Users] Interpreting profiler results<BR><BR></FONT></DIV>----- Message
d'origine ----- <BR>De : Mike Page <BR>Date : 15/02/2010 17:50:
<BLOCKQUOTE cite=mid:LKECIGCCKNOMMCKAGNOAIEKJCNAA.Mike@Page-One.Waitrose.com
type="cite"><PRE wrap="">Hi,
Does anyone know how to interpret the output of the profiler? The nth row,
second column of the profile output is the time (in seconds I guess) taken
to execute the nth statement in the function. if I add up all the time
given, it is only a small fraction of the time the function actually takes.
For example, I have a function that takes about 15 seconds to run.</PRE></BLOCKQUOTE>Did
you measure it with tic & toc or timer() (<=>cpu), i mean in a
scilab way, or in another way ?<BR>It could be either a matter of lack of doc,
or else of scilab unconsistency.<BR>
<BLOCKQUOTE cite=mid:LKECIGCCKNOMMCKAGNOAIEKJCNAA.Mike@Page-One.Waitrose.com
type="cite"><PRE wrap=""> The profiler output totals to only 0.015 seconds.
</PRE></BLOCKQUOTE>The help page for profile() states that<BR><I>systems
counts how many time each line is executed and how may cpu time is spend
<B>for each line execution</B>.<BR>These data are stored within the function
data structure. The profile function allows to extract these data <BR>and
return them in the two first columns</I><BR><BR>Did you try to multiply
column#1 x column#2 and to add results?<BR>I do not see anything else to try
before bug reporting about undocumented time
unit.<BR><BR>Regards<BR>Samuel<BR><BR></BLOCKQUOTE></BODY></HTML>