What Metrics does Understand have?

The below metrics included with Understand have evolved over many years to accommodate common customer requests. However, we recognize that you may need something different. To help you develop custom metrics there is a full API interface to the Understand database as well as a fully developed plugin mechanism.



Object Oriented Metrics

Select to view a specific type of metric:



Friendly Name API Name Description
Base Classes CountClassBase Number of immediate base classes. [aka IFANIN]
Coupling Between Objects CountClassCoupled Number of other classes coupled to. [aka CBO (coupling between object classes)]
Number of Children CountClassDerived Number of immediate subclasses. [aka NOC (number of children)]
Classes CountDeclClass Number of classes.
Class Methods CountDeclClassMethod Number of class methods.
Class Variables CountDeclClassVariable Number of class variables.
Function CountDeclFunction Number of functions.
Instance Methods CountDeclInstanceMethod Number of instance methods. [aka NIM]
Instance Variables CountDeclInstanceVariable Number of instance variables. [aka NIV]
Private Instance Variables CountDeclInstanceVariablePrivate Number of private instance variables.
Protected Instance Variables CountDeclInstanceVariableProtected Number of protected instance variables.
Public Instance Variables CountDeclInstanceVariablePublic Number of public instance variables.
Local Methods CountDeclMethod Number of local methods.
Methods CountDeclMethodAll Number of methods, including inherited ones. [aka RFC (response for class)]
Local Const Methods CountDeclMethodConst Number of local const methods.
Local Default Visibility Methods CountDeclMethodDefault Number of local default methods.
Friend Methods CountDeclMethodFriend Number of local friend methods. [aka NFM]
Private Methods CountDeclMethodPrivate Number of local private methods. [aka NPM]
Protected Methods CountDeclMethodProtected Number of local protected methods.
Public Methods CountDeclMethodPublic Number of local public methods. [aka NPRM]
Local strict private methods CountDeclMethodStrictPrivate Number of local strict private methods.
Local strict published methods CountDeclMethodStrictPublished Number of local strict published methods.
Modules CountDeclModule Number of modules.
Program Units CountDeclProgUnit Number of non-nested modules, block data units, and subprograms.
Subprograms CountDeclSubprogram Number of subprograms.
Outputs CountOutput Number of called subprograms plus global variables set. [aka FANOUT]
Coupled Packages CountPackageCoupled Number of other packages coupled to.
Depth of Inheritance Tree MaxInheritanceTree Maximum depth of class in inheritance tree. [aka DIT]
Lack of Cohesion in Methods PercentLackOfCohesion 100% minus the average cohesion for package entities. [aka LCOM, LOCM]

Base Classes

API Name: CountClassBase
Research: IFANIN
Description: Number of immediate base classes.
Metric available for:

C/C++: Class,Struct,Union Detailed Example
C#: Class,Struct
Basic: Class,Struct
Java: Class,Interface
Pascal: Class,Interface
Python: Class

Back to Top

Coupling Between Objects

API Name: CountClassCoupled
Research: Chidamber & Kemerer – Coupling Between Objects (CBO)
Description: The Coupling Between Object Classes (CBO) measure for a class is a count of the number of other classes to which it is coupled. Class A is coupled to class B if class A uses a type, data, or member from class B. This metric is also referred to as Efferent Coupling (Ce). Any number of couplings to a given class counts as 1 towards the metric total

Chidamber & Kemerer suggest that:
1) Excessive coupling between object classes is detrimental to modular design and prevents reuse.
2) Inter-object class couples should be kept to a minimum.
3) The higher the inter-object class coupling, the more rigorous testing needs to be.
Metric available for:

C/C++: Class,Struct,Union Detailed Example
C#: Class,Struct
Basic: Class,Struct
Java: Class,Interface
Pascal: Class,Interface

Back to Top

Number of Children

API Name: CountClassDerived
Research: Chidamber & Kemerer – Number of Children (NOC)
Description: Number of immediate subclasses. (i.e. the number of classes one level down the inheritance tree from this class).
Metric available for:

C/C++: Class,Struct,Union Detailed Example
C#: Class,Struct
Basic: Class,Struct
Java: Class,Interface
Pascal: Class,Interface
Python: Class

Back to Top

Classes

API Name: CountDeclClass
Description: Number of classes.
Metric available for:

C/C++: Project,File
C#: Project,File
Basic: Project,File
Java: Project,File
Pascal: Project,File
Python: Project,File
Web: Project,File

Back to Top

Class Methods

API Name: CountDeclClassMethod
Description: Number of class methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface

Back to Top

Class Variables

API Name: CountDeclClassVariable
Research: Lorenz & Kidd – Number of Variables (NV)
Description: Number of class variables.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface

Back to Top

Function

API Name: CountDeclFunction
Description: Number of functions.
Metric available for:

C/C++: Project,File
C#: Project,File
Basic: Project,File
Java: Project,File
Python: Project,File
Web: Project,File

Back to Top

Instance Methods

API Name: CountDeclInstanceMethod
Research: NIM
Description: Number of instance methods – methods defined in a class that are only accessable through an object of that class
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface
Python: Project,Class

Back to Top

Instance Variables

API Name: CountDeclInstanceVariable
Research: NIV
Description: Number of instance variables – variables defined in a class that are only accessable through an object of that class
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface
Python: Project,Class

Back to Top

Private Instance Variables

API Name: CountDeclInstanceVariablePrivate
Description: Number of private instance variables.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct

Back to Top

Protected Instance Variables

API Name: CountDeclInstanceVariableProtected
Description: Number of protected instance variables.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct

Back to Top

Public Instance Variables

API Name: CountDeclInstanceVariablePublic
Description: Number of public instance variables.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct

Back to Top

Local Methods

API Name: CountDeclMethod
Research: Chidamber & Kemerer – Weighted Methods per Class (WMC)
Description: Number of local (not inherited) methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface
Python: Project,Class

Back to Top

Methods

API Name: CountDeclMethodAll
Research: Lorenz & Kidd – Number of Methods(NM)
Description: Number of methods, including inherited ones.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,Class,Interface
Pascal: Project,Class,Interface
Python: Project,Class

Back to Top

Local Const Methods

API Name: CountDeclMethodConst
Description: Number of local const methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example

Back to Top

Local Default Visibility Methods

API Name: CountDeclMethodDefault
Description: Number of local default visibility methods.
Metric available for:

Java: Project,File,Class,Interface

Back to Top

Friend Methods

API Name: CountDeclMethodFriend
Research: Lorenz & Kidd – Number of Friends (NF),Number of Friend Methods (NFM)
Description: Number of local (not inherited) friend methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example

Back to Top

Private Methods

API Name: CountDeclMethodPrivate
Research: Number Private Methods (NPRM)
Description: Number of local (not inherited) private methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface

Back to Top

Protected Methods

API Name: CountDeclMethodProtected
Description: Number of local protected methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface

Back to Top

Public Methods

API Name: CountDeclMethodPublic
Research: Lorenz & Kidd – Number of Public Methods (PM),NPM
Description: Number of public methods. Only counts local (not inherited) methods.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Basic: Project,Class,Struct
Java: Project,File,Class,Interface
Pascal: Project,Class,Interface

Back to Top

Local strict private methods

API Name: CountDeclMethodStrictPrivate
Description: Number of local strict private methods.
Metric available for:

Pascal: Project,Class,Interface

Back to Top

Local strict published methods

API Name: CountDeclMethodStrictPublished
Description: Number of local strict published methods.
Metric available for:

Pascal: Project,Class,Interface

Back to Top

Modules

API Name: CountDeclModule
Description: Number of modules.
Metric available for:

Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Jovial: Project,File
Pascal: Project,File
PL/M: Project

Back to Top

Program Units

API Name: CountDeclProgUnit
Description: Number of program units.
Metric available for:

Fortran: Project,File

Back to Top

Subprograms

API Name: CountDeclSubprogram
Description: Number of subprograms.
Metric available for:

Ada: Project,Package
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Compunit,Function,Procedure

Back to Top

Outputs

API Name: CountOutput
Research: FANOUT
Description: The number of outputs that are SET. This can be parameters or global variables. So Functions calls + Parameters set/modify + Global Varibales set/modify. Of the two general approachs to calculating FANOUT (informational versus structural) ours is the informational approach.
Metric available for:

C/C++: Function Detailed Example
C#: Method
Fortran: Function,Program,Subroutine
Java: Method

Back to Top

Coupled Packages

API Name: CountPackageCoupled
Description: Number of other packages coupled to.
Metric available for:

Ada: Project,Package

Back to Top

Depth of Inheritance Tree

API Name: MaxInheritanceTree
Research: Chidamber & Kemerer – Depth of Inheritance Tree (DIT)
Description: The depth of a class within the inheritance hierarchy is the maximum number of nodes from the class node to the root of the inheritance tree. The root node has a DIT of 0. The deeper within the hierarchy, the more methods the class can inherit, increasing its complexity.
Metric available for:

C/C++: Project,Class,Struct,Union Detailed Example
C#: Project,Class,Struct
Java: Project,Class,Interface
Pascal: Project,Class,Interface
Python: Project,Class
Web: Project,PHP Class,PHP Interface

Back to Top

Lack of Cohesion in Methods

API Name: PercentLackOfCohesion
Research: Chidamber & Kemerer – Lack of Cohesion in Methods (LCOM/LOCM)
Description: 100% minus average cohesion for class data members. Calculates what percentage of class methods use a given class instance variable. To calculate, average percentages for all of that class’es instance variables and subtract from 100%. A lower percentage means higher cohesion between class data and methods.
Metric available for:

C/C++: Class,Struct,Union Detailed Example
C#: Class,Struct
Ada: Package
Basic: Class,Struct
Java: Class,Interface
Pascal: Class,Interface

Back to Top