Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab help >> Advanced functions > profiling > showprofile

showprofile

extracts and displays execution profiles of a Scilab function

Calling Sequence

showprofile(fun)

Arguments

fun

a Scilab function

Description

To use showprofile the Scilab function must have been prepared for profiling (see exec).

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 showprofile function outputs profiling results (see profile) with text of the function lines.

Function text is rebuild with fun2string.

Examples

//define function and prepare it for profiling
deff('x=foo(n)',['if n==0 then'
                 '  x=[]'
                 'else'
                 '  x=0'
                 '  for k=1:n'
                 '    s=svd(rand(n+10,n+10))'
                 '    x=x+s(1)'
                 '  end'
                 'end'],'p')

//call the function
foo(30)

//get execution profiles
showprofile(foo)

See Also

  • profile — extract execution profiles of a Scilab function
  • plotprofile — extracts and displays execution profiles of a Scilab function
  • fun2string — generates ascii definition of a scilab function
Report an issue
<< reset_profiling profiling argn >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:24 CEST 2013