Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes

Change language to:
English - 日本語 - Português - Русский
Aide de Scilab >> Performances des programmes > covStart


Instruments some macros to store runtime information on code coverage and execution time


covStart([dirs names])
covStart(lib), covStart("all")
counters = covStart(...)



a specific function (as a string name or a function value).


a column vector of strings. Directory paths to identify macros. All .sci file stored in these directories and loaded within Scilab are instrumented.


a column vector of strings. Per directory name to display on the HTML output.


a library or a string which is a Scilab library name for instrumenting a Scilab-provided library. Can be "all" to instrument all the currently loaded Scilab-provided libraries.


Count of all the instrumentation points.


Instruments the passed arguments to store runtime informations on execution. These informations can be latter exported by calling covWrite or profileGetInfo. To remove any instrumentation data covStop can be used.

You can either select a single function, user-defined libraries (as macros directories) or Scilab-provided libraries. The "all" analysis is useful to have a global overview and later specific informations can be produced for one or a set of identified functions.

Each time the function is called, it clears the previous instrumented counters. The associated profileEnable and profileDisable functions could be used to fine-tune your selection without clearing everything.


covStart(isempty)                      // instrument isempty by macro value
for i=1:1e5; isempty(i); end           // run
covWrite("html", "TMPDIR/coverage")    // write runtime information to a directory
covStop();                             // remove any instrumentation
// load the libraries before instrumeting them

// Pass [dirs names] to list the libraries and associate names
covStart(["SCI\modules\xcos\macros"                 "xcos" ; ..
          "SCI\modules\scicos\macros\scicos_auto"   "scicos_auto" ; ..
          "SCI\modules\scicos\macros\scicos_scicos" "scicos_scicos" ; ..
          "SCI\modules\scicos\macros\scicos_utils"  "scicos_utils"]);

// run the bench
scicos_simulate(scs_m, list(), "nw");

// write the output
covWrite("html", "TMPDIR/coverage2");
// instrument the Scilab "elementary_functions" library

// run
ones(100,200) .\. ones(1000,2000)

// write the output as HTML
covWrite("html", "TMPDIR/coverage3")

See also

  • covStop — Removes all instrumentation data
  • covWrite — Exports runtime information to files
  • profileGetInfo — Retrieve instrumentation information as a Scilab value
  • profileEnable — Add instrumentation to a function, a library or all available functions
  • profileDisable — Remove instrumentation from a function, a library or remove all instrumentation
Report an issue
<< covMerge Performances des programmes covStop >>

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:
Mon Jan 03 14:33:09 CET 2022