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


covWrite

Exports runtime performance results to HTML and binary files

Syntax

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

Arguments

"html"
exports the performance results as HTML files.

"binary"
stores the performance results as binary, for later use.

dir
Path of the output directory for HTML files.

binaryFile
Path and filename of the binary file.

Description

covWrite("html", dir) exports and nicely presents into HTML files the performance results of functions currently activated. Files are stored in the given dir directory.

A separate HTML file is generated for each activated function. For instance, if the macro members is activated, covWrite(…) will generate the file members.html.

covWrite("binary", binaryFile) records in the indicated binary file the performance results of activated functions.

covWrite("html", binaryFile, dir) loads former results stored in the binaryFile and exports them into HTML files.

Paths prefixed with the predefined constants SCI, SCIHOME, SCI.. are automatically expanded.

Examples

Basic example
covStart(isempty)                      // activate isempty for performance measurement
for i = 1:1e5; isempty(i); end         // run it
covWrite("html", "TMPDIR/coverage")    // write runtime performance results to a directory
covStop();                             // deactivate runtime measurement mode for all functions

winopen(fullfile(TMPDIR, "coverage/isempty.html"))   // Displays results (For Windows users)
Create two binaries, merge them, and export merged results into HTML
covStart(isempty)
for i=1:1e5; isempty(i); end
covWrite("binary", "TMPDIR/isempty1")  // write the 1st binary
covStop();                             // stop the measurement mode

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

covMerge(["TMPDIR/isempty1" "TMPDIR/isempty2"], "TMPDIR/isempty") // merge them
covWrite("html", "TMPDIR/isempty", "TMPDIR/coverage") // render the results 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

History

ВерсияОписание
2023.0.0 Formating of covWrite("html") results improved.
Report an issue
<< covStop Coverage profile >>

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:
Mon Jun 17 17:55:12 CEST 2024