Instruments some macros to store runtime information on code coverage and execution time
covStart(macro) covStart([dirs names]) covStart(lib) covStart(libnames) counters = covStart(...)
handle of a specific function. Example: covStart(members),
not covStart("members").
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 the result of librarieslist() 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 call of covStart(librarieslist()) 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(isnan) // instrument isnan by macro value for i=1:1e5; isnan(i); end // run covWrite("html", "TMPDIR/coverage") // write runtime information to a directory covStop(); // remove any instrumentation | ![]() | ![]() |
// load the libraries before instrumeting them loadXcosLibs(); loadScicos(); // 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 importXcosDiagram("SCI\modules\xcos\demos\Cont.Disc-Observer.zcos"); scicos_simulate(scs_m, list(), "nw"); // write the output covWrite("html", "TMPDIR/coverage2"); covStop(); | ![]() | ![]() |
| Version | Description |
| 2024.0.0 | covStart("all") is no more supported. Use covStart(librarylist()) instead. |