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.



Count Metrics

Select to view a specific type of metric:



Friendly Name API Name Description
Average Number of Blank Lines (Include Inactive) AltAvgLineBlank Average number of blank lines for all nested functions or methods, including inactive regions.
Average Number of Lines of Code (Include Inactive) AltAvgLineCode Average number of lines containing source code for all nested functions or methods, including inactive regions.
Average Number of Lines with Comments (Include Inactive) AltAvgLineComment Average number of lines containing comment for all nested functions or methods, including inactive regions.
Blank Lines of Code (Include Inactive) AltCountLineBlank Number of blank lines, including inactive regions.
Lines of Code (Include Inactive) AltCountLineCode Number of lines containing source code, including inactive regions.
Lines with Comments (Include Inactive) AltCountLineComment Number of lines containing comment, including inactive regions.
Average Number of Lines AvgLine Average number of lines for all nested functions or methods.
Average Number of Blank Lines AvgLineBlank Average number of blank for all nested functions or methods.
Average Number of Lines of Code AvgLineCode Average number of lines containing source code for all nested functions or methods.
Average Number of Lines with Comments AvgLineComment Average number of lines containing comment for all nested functions or methods.
Number of Files CountDeclFile Number of files.
Function CountDeclFunction Number of functions.
Internal Instance Variables CountDeclInstanceVariableInternal Number of internal instance variables.
Protected Internal Instance Variables CountDeclInstanceVariableProtectedInternal Number of protected internal instance variables.
Friend Methods CountDeclMethodFriend Number of local friend methods. [aka NFM]
Local Internal Methods CountDeclMethodInternal Number of local internal methods.
Local Protected Internal Methods CountDeclMethodProtectedInternal Number of local protected internal methods.
Inputs CountInput Number of calling subprograms plus global variables read. [aka FANIN]
Physical Lines CountLine Number of all lines. [aka NL]
Blank Lines of Code CountLineBlank Number of blank lines. [aka BLOC]
Blank html lines CountLineBlank_Html Number of blank html lines.
Blank javascript lines CountLineBlank_Javascript Number of blank javascript lines.
Blank php lines CountLineBlank_Php Number of blank php lines.
Source Lines of Code CountLineCode Number of lines containing source code. [aka LOC]
Declarative Lines of Code CountLineCodeDecl Number of lines containing declarative source code.
Executable Lines of Code CountLineCodeExe Number of lines containing executable source code.
Javascript source code lines CountLineCode_Javascript Number of javascript lines containing source code.
PHP Source Code Lines CountLineCode_Php Number of php lines containing source code.
Lines with Comments CountLineComment Number of lines containing comment. [aka CLOC]
HTML Comment Lines CountLineComment_Html Number of html lines containing comment.
Javascript Comment Lines CountLineComment_Javascript Number of javascript lines containing comment.
PHP Comment Lines CountLineComment_Php Number of php lines containing comment.
Inactive Lines CountLineInactive Number of inactive lines.
Preprocessor Lines CountLinePreprocessor Number of preprocessor lines.
HTMLLines CountLine_Html Number of all html lines.
Javascript Lines CountLine_Javascript Number of all javascript lines.
PHP Lines CountLine_Php Number of all php lines.
Semicolons CountSemicolon Number of semicolons.
Statements CountStmt Number of statements.
Declarative Statements CountStmtDecl Number of declarative statements.
Javascript Declarative Statements CountStmtDecl_Javascript Number of javascript declarative statements.
PHP Declarative Statements CountStmtDecl_Php Number of php declarative statements.
Empty Statements CountStmtEmpty Number of empty statements.
Executable Statements CountStmtExe Number of executable statements.
Javascript Executable Statements CountStmtExe_Javascript Number of javascript executable statements.
PHP Executable Statements CountStmtExe_Php Number of php executable statements.
Comment to Code Ratio RatioCommentToCode Ratio of comment lines to code lines.

Average Number of Blank Lines (Include Inactive)

API Name: AltAvgLineBlank
Description: Average number of blank lines for all nested functions or methods, including inactive regions.
Metric available for:

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

Back to Top

Average Number of Lines of Code (Include Inactive)

API Name: AltAvgLineCode
Description: Average number of lines containing source code for all nested functions or methods, including inactive regions.
Metric available for:

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

Back to Top

Average Number of Lines with Comments (Include Inactive)

API Name: AltAvgLineComment
Description: Average number of lines containing comment for all nested functions or methods, including inactive regions.
Metric available for:

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

Back to Top

Blank Lines of Code (Include Inactive)

API Name: AltCountLineBlank
Description: Number of blank lines, including in inactive regions.
Metric available for:

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

Back to Top

Lines of Code (Include Inactive)

API Name: AltCountLineCode
Description: Number of lines containing source code, including inactive regions.
Metric available for:

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

Back to Top

Lines with Comments (Include Inactive)

API Name: AltCountLineComment
Description: Number of lines containing comments, including comments within inactive regions.
Metric available for:

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

Back to Top

Average Number of Lines

API Name: AvgLine
Description: Average number of lines for all nested functions or methods.
Metric available for:

C/C++: Project,File,Class,Struct,Union Detailed Example
C#: Project,File,Class,Struct
Ada: Project,File,Package
Basic: Project,File,Class,Struct
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface
PL/M: Project,File
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Back to Top

Average Number of Blank Lines

API Name: AvgLineBlank
Description: Average number of blank for all nested functions or methods.
Metric available for:

C/C++: Project,File,Class,Struct,Union Detailed Example
C#: Project,File,Class,Struct
Ada: Project,File,Package
Basic: Project,File,Class,Struct
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface
PL/M: Project,File
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Back to Top

Average Number of Lines of Code

API Name: AvgLineCode
Research: Lorenz & Kidd – Average Method Size (AMS)
Description: Average number of lines containing source code for all nested functions or methods.
Metric available for:

C/C++: Project,File,Class,Struct,Union Detailed Example
C#: Project,File,Class,Struct
Ada: Project,File,Package
Basic: Project,File,Class,Struct
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface
PL/M: Project,File
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Back to Top

Average Number of Lines with Comments

API Name: AvgLineComment
Description: Average number of lines containing comment for all nested functions or methods.
Metric available for:

C/C++: Project,File,Class,Struct,Union Detailed Example
C#: Project,File,Class,Struct
Ada: Project,File,Package
Basic: Project,File,Class,Struct
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface
PL/M: Project,File
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Back to Top

Number of Files

API Name: CountDeclFile
Description: Number of files.
Metric available for:

C/C++: Project
C#: Project
Ada: Project
Basic: Project
Fortran: Project
Java: Project
Jovial: Project
Pascal: Project
PL/M: Project
Python: Project
VHDL: Project
Cobol: Project
Web: Project

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

Internal Instance Variables

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

C#: Project,Class,Struct

Back to Top

Protected Internal Instance Variables

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

C#: Project,Class,Struct

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

Local Internal Methods

API Name: CountDeclMethodInternal
Description: Number of local internal methods.
Metric available for:

C#: Project,Class,Struct

Back to Top

Local Protected Internal Methods

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

C#: Project,Class,Struct

Back to Top

Inputs

API Name: CountInput
Research: FANIN
Description: The number of inputs a function uses plus the number of unique subprograms calling the function. Inputs include parameters and global variables that are used in the function, so Functions calledby + Parameters read + Global Variables read. Of the two general approachs to calculating FANIN (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

Physical Lines

API Name: CountLine
Research: NL
Description: Number of physical lines.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File,Procedure,Function,Process,Architecture
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Back to Top

Blank Lines of Code

API Name: CountLineBlank
Research: BLOC
Description: Number of blank lines.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File,Procedure,Function,Process,Architecture
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Back to Top

Blank html lines

API Name: CountLineBlank_Html
Description: Number of blank html lines.
Metric available for:

Web: Project,File

Back to Top

Blank javascript lines

API Name: CountLineBlank_Javascript
Description: Number of blank javascript lines.
Metric available for:

Web: Project,File

Back to Top

Blank php lines

API Name: CountLineBlank_Php
Description: Number of blank php lines.
Metric available for:

Web: Project,File,PHP Class,PHP Interface

Back to Top

Source Lines of Code

API Name: CountLineCode
Research: LOC, SLOC
Description: The number of lines that contain source code. Note that a line can contain source and a comment and thus count towards multiple metrics. For Classes this is the sum of the CountLineCode for the member functions of the class.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File,Procedure,Function,Process,Architecture
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Back to Top

Declarative Lines of Code

API Name: CountLineCodeDecl
Description: Number of lines containing declarative source code. Note that a line can be declarative and executable – int i =0; for instance.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
Python: Project,File,Class,Function

Back to Top

Executable Lines of Code

API Name: CountLineCodeExe
Description: Number of lines containing executable source code.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
Python: Project,File,Class,Function

Back to Top

Javascript source code lines

API Name: CountLineCode_Javascript
Description: Number of javascript lines containing source code.
Metric available for:

Web: Project,File

Back to Top

PHP Source Code Lines

API Name: CountLineCode_Php
Description: Number of php lines containing source code.
Metric available for:

Web: Project,File,PHP Class,PHP Interface

Back to Top

Lines with Comments

API Name: CountLineComment
Research: CLOC
Description: Number of lines containing comment. This can overlap with other code counting metrics. For instance int j = 1; // comment has a comment, is a source line, is an executable source line, and a declarative source line.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File,Procedure,Function,Process,Architecture
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Back to Top

HTML Comment Lines

API Name: CountLineComment_Html
Description: Number of html lines containing comment.
Metric available for:

Web: Project,File

Back to Top

Javascript Comment Lines

API Name: CountLineComment_Javascript
Description: Number of javascript lines containing comment.
Metric available for:

Web: Project,File

Back to Top

PHP Comment Lines

API Name: CountLineComment_Php
Description: Number of php lines containing comment.
Metric available for:

Web: Project,File,PHP Class,PHP Interface

Back to Top

Inactive Lines

API Name: CountLineInactive
Description: This is the number of lines that are inactive from the view of the preprocessor. In other words, they are on the FALSE side of a #if or #ifdef preprocessor directive.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure

Back to Top

Preprocessor Lines

API Name: CountLinePreprocessor
Description: Number of preprocessor lines.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task

Back to Top

HTMLLines

API Name: CountLine_Html
Description: Number of all html lines.
Metric available for:

Web: Project,File

Back to Top

Javascript Lines

API Name: CountLine_Javascript
Description: Number of all javascript lines.
Metric available for:

Web: Project,File

Back to Top

PHP Lines

API Name: CountLine_Php
Description: Number of all php lines.
Metric available for:

Web: Project,File,PHP Class,PHP Interface

Back to Top

Semicolons

API Name: CountSemicolon
Description: Number of semicolons.
Metric available for:

C/C++: Project,File,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Java: Project,File,Class,Interface,Method

Back to Top

Statements

API Name: CountStmt
Description: Number of declarative plus executable statements.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File
Cobol: Project,File
Web: Project,File

Back to Top

Declarative Statements

API Name: CountStmtDecl
Description: Number of declarative statements.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Back to Top

Javascript Declarative Statements

API Name: CountStmtDecl_Javascript
Description: Number of javascript declarative statements.
Metric available for:

Web: Project,File

Back to Top

PHP Declarative Statements

API Name: CountStmtDecl_Php
Description: Number of php declarative statements.
Metric available for:

Web: Project,File,PHP Class,PHP Interface

Back to Top

Empty Statements

API Name: CountStmtEmpty
Description: Number of empty statements.
Metric available for:

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

Back to Top

Executable Statements

API Name: CountStmtExe
Description: Number of executable statements.
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Module,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Back to Top

Javascript Executable Statements

API Name: CountStmtExe_Javascript
Description: Number of javascript executable statements.
Metric available for:

Web: Project,File

Back to Top

PHP Executable Statements

API Name: CountStmtExe_Php
Description: Number of php executable statements.
Metric available for:

Web: Project,File,PHP Class,PHP Interface

Back to Top

Comment to Code Ratio

API Name: RatioCommentToCode
Description: Ratio of number of comment lines to number of code lines. Note that because some lines are both code and comment, this could easily yield percentages higher than 100
Metric available for:

C/C++: Project,File,Class,Struct,Union,Function Detailed Example
C#: Project,File,Class,Method
Ada: Project,File,Type,Entry,Function,Package,Procedure,Protected,Task
Basic: Project,File,Method,Module,Class
Fortran: Project,File,Block Data,Function,Program,Subroutine
Java: Project,File,Class,Interface,Method
Jovial: Project,File,Module,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
PL/M: Project,File,Procedure
Python: Project,File,Class,Function
VHDL: Project,File,Procedure,Function,Architecture
Web: Project,File

Back to Top