Imagix 4D User Guide


Software Metrics

For each symbol in the database, Imagix 4D collects a number of attributes. These attributes are specific to the type of symbol they describe. Unless otherwise noted, the attribute data is collected and updated by analyzing your source code.

Primary among the collected attributes are software metrics. These are quantitative measurements of some aspect of the symbols in your source code. The metrics collected by Imagix 4D are specific to the type of symbol they describe. Primary among the Imagix 4D tools for viewing and analyzing the metrics are the Metrics windows available under the Reports menu.

Directory Level Metrics
C FilesNumber of C files in the directory.
C++ FilesNumber of C++ files in the directory.
Comment RatioRatio of the lines of comments to the lines of source code in the directory.
Declarations in DirectoryNumber of top-level declarations in the directory, including types, variables, functions and macro defines. Not applicable for Java.
Directory Size (bytes)Total size of the files in the directory, in bytes.
Functions in DirectoryNumber of functions defined in the directory.
Halstead Intelligent ContentLanguage-independent measure of the amount of content (complexity) of the directory (Halstead I).
Halstead Mental EffortMeasure of the number of elemental mental discriminations necessary to create, or understand, the directory (Halstead E).
Halstead Program VolumeMeasure of the information content of the directory (Halstead V).
Halstead Program DifficultyMeasure of how compactly the directory implements its algorithms (Halstead D). This is the inverse of the Halstead Program Level (of abstraction).
Header FilesNumber of C and C++ header files in the directory.
Java Class FilesNumber of Java Class files in the directory.
Java FilesNumber of Java files in the directory.
Lines of Source CodeNumber of lines of statements in the directory.
Lines of CommentsNumber of lines of comments in the directory.
McCabe Average ComplexityAverage cyclomatic complexity for functions defined in the directory.
McCabe Max ComplexityMaximum cyclomatic complexity for functions defined in the directory.
McCabe Total ComplexityTotal cyclomatic complexity functions defined in the directory.
Maintainability IndexMeasure of the maintainability of the directory (Welker MI).
Number of StatementsNumber of statements in the directory.
Total FilesNumber of C, C++ and Java files in the directory.
Total LinesNumber of lines in the directory.
Variables in DirectoryNumber of variables and parameters defined in the directory. For local variables and parameters to be counted, data must be collected with the -locals option enabled. Not applicable for Java.
File Level 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.
Directly Included-By FilesNumber of header files in the project database which directly include the file. Not applicable for Java.
Directly Included FilesNumber of header files in the project database which are directly included by the file. Not applicable for Java.
File Size (bytes)Size of the file, in bytes.
Functions in FileNumber of functions defined in the file.
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).
Included LinesNumber of lines in header files in the project database which are transitively included by the file. Not applicable for Java.
Lines of Source CodeNumber of lines of statements in the file.
Lines of CommentsNumber of lines of comments in the file.
McCabe Average ComplexityAverage cyclomatic complexity for functions defined in the file.
McCabe Max ComplexityMaximum cyclomatic complexity for functions defined in the file.
McCabe Total ComplexityTotal cyclomatic complexity functions defined in the file.
Maintainability IndexMeasure of the maintainability of the file (Welker MI).
Number of StatementsNumber of statements in the file.
Total LinesNumber of lines in the file.
Trans Included-By FilesNumber of header files in the project database which transitively include the file. Not applicable for Java.
Trans Included FilesNumber of header files in the project database which are transitively included by the file. Not applicable for Java.
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.
Namespace/Package Level Metrics
Member AttributesNumber of attributes (member variables) of the namespace.
Member ClassesNumber of classes (member classes) of the namespace.
Member MethodsNumber of methods (member functions) of the namespace.
Total Members of ClassTotal number of members of the namespace.
Class Level Metrics
CK Class CohesionLack of Cohesion of Methods is a measure of the cohesion of the member functions of the class (Chidamber and Kemerer LCOM, 1994 revised definition). Users may also select alternative definitions of class cohesion. One alternative is Hitz and Montazeri's 1996 redefinition of Li and Henry's graph theoretical calculation. The second is Henderson-Sellers definition, a ratio of methods (member functions) which do not read or set a specific attribute (member variable), averaged over all the attributes of the class.
CK Class CouplingMeasure of the coupling, or dependency, of the class (Chidamber and Kemerer CBO). This represents the number of external classes used.
CK Depth of InheritanceDepth of the hierarchy of base classes of the class (Chidamber and Kemerer DIT).
CK Number of ChildrenNumber of classes directly derived from class (Chidamber and Kemerer NOC).
CK Response for ClassNumber of methods called by the class's methods, a measure of the class's response (Chidamber and Kemerer RFC).
CK Weighted MethodsTotal cyclomatic complexity for the class's methods (Chidamber and Kemerer WMC).
Class CouplingAlternative measure of the coupling, or dependency, of the class. Calculation is based on the number of inherited classes, the number of nested classes, the number of calls to static member functions, and the number of parameters and local variables used by class member functions and having a class type. To be accurate, data must be collected with the -locals option enabled. The higher this value, the more effort is required to understand, use and modify the class.
Derived ClassesDepth of the hierarchy of derived classes of the class.
Ext. Methods and CouplingTotal number of external classes used and external methods called by class member methods. This is the sum of coupling between classes and external methods called. To be accurate, data must be collected with the -locals option enabled.
Fan In of Inherited ClassesNumber of base classes directly inherited by class.
Halstead Intelligent ContentLanguage-independent measure of the amount of content (complexity) of the class (Halstead I).
Halstead Mental EffortMeasure of the number of elemental mental discriminations necessary to create, or understand, the class (Halstead E).
Halstead Program VolumeMeasure of the information content of the class (Halstead V).
Halstead Program DifficultyMeasure of how compactly the class implements its algorithms (Halstead D). This is the inverse of the Halstead Program Level (of abstraction).
Local MethodsNumber of local methods (private member functions) of the class.
McCabe Average ComplexityAverage cyclomatic complexity for class methods.
McCabe Max ComplexityMaximum cyclomatic complexity for class methods.
McCabe Total ComplexityTotal cyclomatic complexity for class methods (same as CK Response for Class).
Member AttributesNumber of attributes (member variables) of the class.
Member ClassesNumber of nested classes (member classes) of the class.
Member TypesNumber of member typedefs of the class.
Member MethodsNumber of methods (member functions) of the class.
Methods Called, ExternalNumber of external methods called by class methods.
Methods Called, InternalNumber of internal methods called by class methods.
Total Members of ClassTotal number of members of the class.
Function Level Metrics
CoveragePercentage of blocks of code that were executed (profile data).
Decision Depth in FunctionNumber of nested levels of decisions or control statements within the function.
Fan In of Function CallsNumber of functions in the source files loaded into the project which call or read the function, either directly or through function pointers.
Fan Out of Function CallsNumber of functions which are called or read by the function, either directly or through function pointers.
FrequencyNumber of times the function was called during execution (profile data).
Global Variables UsedNumber of global variables set and/or read by the function.
Halstead Intelligent ContentLanguage-independent measure of the amount of content (complexity) of the function (Halstead I).
Halstead Mental EffortMeasure of the number of elemental mental discriminations necessary to create, or understand, the function (Halstead E).
Halstead Program VolumeMeasure of the information content of the function (Halstead V).
Halstead Program DifficultyMeasure of how compactly the function implements its algorithms (Halstead D). This is the inverse of the Halstead Program Level (of abstraction).
KnotsMeasure of the complexity and unstructuredness of the function (Woodward, Hennell and Hedley knot).
Lines in FunctionNumber of lines in the function.
Lines of Source CodeNumber of lines of statements in the function.
McCabe Cyclomatic CmplxCyclomatic complexity of the function (McCabe v(G)). This represents the number of decision points in the function. It also represents the number of linearly independent test paths through the function. Users may also select alternative calculations of cyclomatic complexity, either Myers' 1979 Extension counting predicates within decisions, or the Modified definition counting parallel cases as a single decision.
McCabe Decision DensityDecision density (cyclomatic density) of a function. Calculated as the ratio of the cyclomatic complexity to the lines of statements for the function.
McCabe Essential CmplxEssential complexity of the function (McCabe ev(G)). This represents the number of decision points in the function which contain unstructured constructs.
McCabe Essential DensityEssential density, or degree of unstructuredness, of a function. Calculated as the ratio of the essential complexity to the cyclomatic complexity.
Static Variables UsedNumber of static variables set and/or read by the function.
Transitive Fan In of FuncsNumber of functions in the source files loaded into the project which transitively call or read the function, including calls through function pointers.
Transitive Fan Out of FuncsNumber of functions which are transitively called or read by the function, including calls through function pointers.
TimeTime spent executing the function (profile data).
Variables in FunctionNumber of parameters and locals variables in the function. To be accurate (non-zero), data must be collected with the -locals option enabled.
Variable Level Metrics
Functions ReadingNumber of functions in the source files loaded into the project which read the variable.
Functions SettingNumber of functions in the source files loaded into the project which set the variable.
Functions UsingNumber of functions in the source files loaded into the project which read and/or set the variable.