Functions to access varous code coverage statistics.
hcl
code-coverage-file-stats-lambdas-count ccfs keyword => count
code-coverage-file-stats-called ccfs keyword => count
code-coverage-file-stats-fully-covered ccfs keyword => count
code-coverage-file-stats-hidden-covered ccfs keyword => count
code-coverage-file-stats-not-called ccfs keyword => count
code-coverage-file-stats-partially-covered ccfs keyword => count
code-coverage-file-stats-counters-count ccfs keyword => count
code-coverage-file-stats-counters-executed ccfs keyword => count
code-coverage-file-stats-counters-hidden ccfs keyword => count
ccfs⇩ |
A code-coverage-file-stats object. |
keyword⇩ |
One of :functions , :macros , :one-shot , :lambdas , :all , :runtime or :non-runtime . |
count |
An integer. |
These functions return integers counting "lambdas" in the file associated with ccfs, where "lambda" here means a separate function object that was produced by the compiler. In most cases these correspond to pieces of code that you can see, like a function that results from cl:defun or cl:defmethod, or a lambda that appears in your code, but in some cases the compiler generates functions in a non-obvious way.
keyword specifies the kind of lambda. All lambdas belong to one of these four kinds:
:functions |
Functions that are defined by cl:defun. |
:macros |
Macros and macro-like (for example cl:defsetf). |
:one-shot |
Load time lambdas that the compiler generates. |
:lambdas |
Other lambdas (including cl:defmethod). |
In addition, the following three values of keyword can be used:
:all |
All lambdas. |
:runtime | :functions and :lambdas . |
:non-runtime | :one-shot and :macros . |
Each function returns the number of lambdas or counters of the kind specified by keyword in the file associated with ccfs. These are:
code-coverage-file-stats-lambdas-count | |
All lambdas. | |
code-coverage-file-stats-called | |
Lambdas that have been called. | |
code-coverage-file-stats-fully-covered | |
Lambdas which were fully covered, that is all of their counters are non-zero. | |
code-coverage-file-stats-hidden-covered | |
Lambdas where there are counters which are 0, but do not correspond to actual source code (result of macroexpansion). | |
code-coverage-file-stats-not-called | |
Lambdas that were not called at all. | |
code-coverage-file-stats-partially-covered | |
Lambdas that were partially covered, but part of the source did not execute. | |
code-coverage-file-stats-counters-count | |
All counters. | |
code-coverage-file-stats-counters-executed | |
Counters that executed (that is, they are not zero). | |
code-coverage-file-stats-counters-hidden | |
Counters which have not been executed and are hidden, that is not in the source (in a result of macroexpansion). |
code-coverage-file-stats-called code-coverage-file-stats :runtime => lambda-count
where lambda-count is the number of lambdas in the file which are "run time" and have been called.
10 Code Coverage
code-coverage-data-generate-statistics
code-coverage-file-stats
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35