Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function
extract execution profiles of a Scilab function
a Scilab function
a nx3 matrix containig the execution profiles
profile, profiling instructions need to be added to the Scilab function
function by add_profiling.
For such function, When such a function is executed the 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 of
column gives a measure of interpetor effort for one execution of
corresponding line. Ith line of
c corresponds to Ith line of the
function (included first)
Note that, due to the precision of the processor clock (typically one micro second), some executed lines may appear with 0 cpu time even if total cpu time really spend in their execution is large.
function x=foo(a, n) x=0; for i=1:n if x<10 then x=x+a else x=x+1 end end x=x^2+1 endfunction add_profiling("foo") foo(0.1,100) //run the function profile(foo) //extract profile information
|Report an issue