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
History
Version | Description |
2023.0.0 | Formating of covWrite("html") results improved. |
Report an issue | ||
<< covStop | Scilab code instrumentation | profile >> |