[ HOME --> Understand for C++ --> Metrics ]
  Links:   Contact Information   Email Support   Email Sales


Software Metrics of All Kinds

Understand for C++ calculates source code metrics about each function, source file, and your entire project. The software metrics can be viewed in the HTML output, and also easily exported to spreadsheets, databases, or other data analysis packages (use the Project->Export Metrics menu). The metrics are commonly desired structure, size, and object oriented metrics. They are listed below along with their common acronym (if available from the commonly referred to literature).

An always up to date textual list of all metrics is available

Note that with the PERL or C API you can write your own scripts/programs to capture and use software measurements in ways specific to your development process.


Object-Oriented Metrics (OO Metrics):

Number of classes.
Maximum depth of class in inheritance tree. [DIT]
Number of other classes coupled to. [CBO, Coupling between Object classes]
Number of immediate subclasses. [NOC, Number Of Children]
Number of instance methods. [NIM]
Number of local methods. [WMC, Weighted Methods per Class]
Number of methods, including inherited ones. [RFC, Response For Class]
Number of local friend methods. [NFM]
Number of local public methods. [NPM]
Number of local private methods. [NPRM]
Number of instance variables. [NIV]
Number of inputs used (parameters, global variables). [FANIN]
Number of immediate base classes. [IFANIN]
Number of outputs used (parameters, global variables). [FANOUT]
Lack of Cohesion - 100% minus average cohesion for class data members. [LOCM or LCOM]

Complexity Metrics: (per function, and averaged over class, and files)

Cyclomatic complexity.
Modified cyclomatic complexity.
Strict cyclomatic complexity.
Average cyclomatic complexity for all nested functions or methods.
Average modified cyclomatic complexity for all nested functions or methods.
Average strict cyclomatic complexity for all nested functions or methods.
Maximum cyclomatic complexity of all nested functions or methods.
Maximum modified cyclomatic complexity of all nested functions or methods.
Maximum strict cyclomatic complexity of all nested functions or methods.
Maximum nesting level of control constructs.

Size/Volume Metrics (project-wide, per class, per function, per file):

Number of files.
Number of functions.
Number of statements. [STMT]
Number of declarative statements.
Number of executable statements.
Number of all lines. [NL]
Number of blank lines. [BLOC]
Number of lines containing source code. [LOC]
Number of lines containing declarative source code.
Number of lines containing executable source code.
Number of lines containing comment. [CLOC]
Number of comment lines divided by code lines, times 100.
Average number of lines for all nested functions or methods.
Average number of blank for all nested functions or methods.
Average number of lines containing source code for all nested functions or methods.
Average number of lines containing comment for all nested functions or methods.
Halsted Metrics (done via Understand's scripting language)