File Metrics
The following metrics are generated for source files in the project source code. The inclusion metrics, measuring aspects of #include preprocessor directives, are omitted for Java files.
Size Metrics
Comment Ratio | Ratio of the lines of comments to the lines of source code in the file. |
Declarations in File | Number of top-level declarations in the file, including types, variables, functions and macro defines. Not applicable for Java. |
File Size (bytes) | Size of the file, in bytes. |
Functions in File | Number of functions defined in the file. |
Lines in File | Number of lines in the file. |
Lines of Source Code | Number of lines in the file that have source code, i.e. all lines except empty lines, lines that have just comments, and lines omitted because of preprocessor conditions. |
Lines of Comments | Number of lines of comments in the file. |
Number of Statements | Number of statements in the file. An individual statement can extend over multiple lines. |
Variables in File | Number of variables and parameters defined in the file. |
| For local variables and parameters to be counted, data must be collected with the -locals option enabled. Not applicable for Java. |
Complexity Metrics
Halstead Intelligent Content | Language-independent measure of the amount of content (complexity) of the file (Halstead I). |
Halstead Mental Effort | Measure of the number of elemental mental discriminations necessary to create, or understand, the file (Halstead E). |
Halstead Program Volume | Measure of the information content of the file (Halstead V). |
Halstead Program Difficulty | Measure of how compactly the file implements its algorithms (Halstead D). This is the inverse of the Halstead Program Level (of abstraction). |
McCabe Average Complexity | Average cyclomatic complexity for all functions defined in the file. |
McCabe Maximum Complexity | Maximum cyclomatic complexity for any function defined in the file. |
McCabe Total Complexity | Total cyclomatic complexity for all functions defined in the file. |
Maintainability Index | Measure of the maintainability of the file (Welker MI). |
Inclusion Metrics
| Inclusion metrics apply only to C and C++ files. |
Directly Included-By Files | Number of header files in the project database which directly include the file. |
Directly Included Files | Number of header files in the project database which are directly included by the file. |
Included Lines | Number of lines in header files in the project database which are transitively included by the file. |
Trans Included-By Files | Number of header files in the project database which transitively include the file. |
Trans Included Files | Number of header files in the project database which are transitively included by the file. |
|