Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Coverage > covWrite

covWrite

Exports runtime information to files

Syntax

covWrite("html", dir)
covWrite("binary", binaryFile)
covWrite("html", binaryFile, dir)

Arguments

"html"

exports the coverage data as HTML files

"binary"

store the coverage data as binary for later use

dir

output directory as a string

binaryFile

stored binary filename as a string

Description

This command is used to export, store or "load and export" runtime instrumentation data to the file system. The major usage is to export the current runtime information to HTML files on a directory using covWrite("html", "TMPDIR/coverage").

This command is used to export, store or "load and export" runtime instrumentation data to the file system.

Basic example

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

Binary exemple

covStart(isempty)
for i=1:1e5; isempty(i); end
covWrite("binary", "TMPDIR/isempty1")  // write runtime information
covStop();                             // clear instrumentation

covStart(isempty)
for i=1:1e5; isempty(string(i)); end
covWrite("binary", "TMPDIR/isempty2")  // write other runtime information
covStop();

covMerge(["TMPDIR/isempty1" "TMPDIR/isempty2"], "TMPDIR/isempty") // merge them
covWrite("html", "TMPDIR/isempty", "TMPDIR/coverage") // render the information as HTML

See also

  • covStart — Instruments some macros to store runtime information on code coverage and execution time
  • covStop — Removes all instrumentation data
  • covMerge — Merges coverage results and exports to a file
Report an issue
<< covStop Coverage Lint tool (SLint) >>

Copyright (c) 2022-2024 (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:
Thu Feb 14 15:05:28 CET 2019