[scilab-Users] Interpreting profiler results

Mike Page Mike at Page-One.Waitrose.com
Mon Feb 15 20:33:19 CET 2010


Hi Samuel,

Thanks for your suggestions.

Yes, I used tic() and toc().  They showed 15 seconds (which agrees with what
I see on a clock).

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.

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?

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.

Regards,
Mike.

  -----Original Message-----
  From: Samuel Gougeon [mailto:Samuel.Gougeon at univ-lemans.fr]
  Sent: 15 February 2010 18:21
  To: users at lists.scilab.org
  Subject: Re: [scilab-Users] Interpreting profiler results


  ----- Message d'origine -----
  De : Mike Page
  Date : 15/02/2010 17:50:
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.Did you
measure it with tic & toc or timer() (<=>cpu), i mean in a scilab way, or in
another way ?
  It could be either a matter of lack of doc, or else of scilab
unconsistency.

  The profiler output totals to only 0.015 seconds.
  The help page for profile() states that
  systems counts how many time each line is executed and how may cpu time is
spend for each line execution.
  These data are stored within the function data structure. The profile
function allows to extract these data
  and return them in the two first columns

  Did you try to multiply column#1 x column#2 and to add results?
  I do not see anything else to try before bug reporting about undocumented
time unit.

  Regards
  Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100215/107a32be/attachment.htm>


More information about the users mailing list