Imagix 4D User Guide


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 RatioRatio of the lines of comments to the lines of source code in the file.
Declarations in FileNumber 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 FileNumber of functions defined in the file.
Lines in FileNumber of lines in the file.
Lines of Source CodeNumber of lines of statements in the file.
Lines of CommentsNumber of lines of comments in the file.
Number of StatementsNumber of statements in the file.
Variables in FileNumber 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 ContentLanguage-independent measure of the amount of content (complexity) of the file (Halstead I).
Halstead Mental EffortMeasure of the number of elemental mental discriminations necessary to create, or understand, the file (Halstead E).
Halstead Program VolumeMeasure of the information content of the file (Halstead V).
Halstead Program DifficultyMeasure of how compactly the file implements its algorithms (Halstead D). This is the inverse of the Halstead Program Level (of abstraction).
McCabe Average ComplexityAverage cyclomatic complexity for all functions defined in the file.
McCabe Maximum ComplexityMaximum cyclomatic complexity for any function defined in the file.
McCabe Total ComplexityTotal cyclomatic complexity for all functions defined in the file.
Maintainability IndexMeasure of the maintainability of the file (Welker MI).

Inclusion Metrics

Inclusion metrics apply only to C and C++ files.
Directly Included-By FilesNumber of header files in the project database which directly include the file.
Directly Included FilesNumber of header files in the project database which are directly included by the file.
Included LinesNumber of lines in header files in the project database which are transitively included by the file.
Trans Included-By FilesNumber of header files in the project database which transitively include the file.
Trans Included FilesNumber of header files in the project database which are transitively included by the file.