Metrics


Complexity Metrics


Select to view a specific type of metric:
Friendly NameAPI NameDescription
Average Cyclomatic ComplexityAvgCyclomaticAverage cyclomatic complexity for all nested functions or methods.
Average Modified Cyclomatic ComplexityAvgCyclomaticModifiedAverage modified cyclomatic complexity for all nested functions or methods.
Average Strict Cyclomatic ComplexityAvgCyclomaticStrictAverage strict cyclomatic complexity for all nested functions or methods.
Average Essential Cyclomatic ComplexityAvgEssentialAverage Essential complexity for all nested functions or methods.
Average Essential Strict Modified ComplexityAvgEssentialStrictModifiedAverage strict modified essential complexity for all nested functions or methods.
PathsCountPathNumber of possible paths, not counting abnormal exits or gotos. [aka NPATH]
Cyclomatic ComplexityCyclomaticCyclomatic complexity.
Modified Cyclomatic ComplexityCyclomaticModifiedModified cyclomatic complexity.
Strict Cyclomatic ComplexityCyclomaticStrictStrict cyclomatic complexity.
Essential ComplexityEssentialEssential complexity. [aka Ev(G)]
Essential Strict Modified ComplexityEssentialStrictModifiedStrict Modified Essential complexity.
KnotsKnots Measure of overlapping jumps.
Max Cyclomatic ComplexityMaxCyclomaticMaximum cyclomatic complexity of all nested functions or methods.
Max Modified Cyclomatic ComplexityMaxCyclomaticModifiedMaximum modified cyclomatic complexity of nested functions or methods.
Max Strict Cyclomatic ComplexityMaxCyclomaticStrictMaximum strict cyclomatic complexity of nested functions or methods.
Max Essential ComplexityMaxEssentialMaximum essential complexity of all nested functions or methods.
Max KnotsMaxEssentialKnotsMaximum Knots after structured programming constructs have been removed.
Max Essential Strict Modified ComplexityMaxEssentialStrictModifiedMaximum strict modified essential complexity of all nested functions or methods.
Depth of Inheritance TreeMaxInheritanceTreeMaximum depth of class in inheritance tree. [aka DIT]
NestingMaxNestingMaximum nesting level of control constructs.
Minimum KnotsMinEssentialKnotsMinimum Knots after structured programming constructs have been removed.
Comment to Code RatioRatioCommentToCodeRatio of comment lines to code lines.
Sum Cyclomatic ComplexitySumCyclomaticSum of cyclomatic complexity of all nested functions or methods. [aka WMC]
Sum Modified Cyclomatic ComplexitySumCyclomaticModifiedSum of modified cyclomatic complexity of all nested functions or methods.
Sum Strict Cyclomatic ComplexitySumCyclomaticStrictSum of strict cyclomatic complexity of all nested functions or methods.
Sum Essential ComplexitySumEssentialSum of essential complexity of all nested functions or methods.
Sum Essential Strict Modified ComplexitySumEssentialStrictModifiedSum of strict modified essential complexity of all nested functions or methods.



Average Cyclomatic Complexity

API Name: AvgCyclomatic
Description: Average cyclomatic complexity 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
PL/M: Project,File
Python: Project,File,Class
VHDL: Project,File,Architecture
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Average Modified Cyclomatic Complexity

API Name: AvgCyclomaticModified
Description: Average modified cyclomatic complexity 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
PL/M: Project,File
Python: Project,File,Class
VHDL: Project,File,Architecture
Cobol: Project,File
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Average Strict Cyclomatic Complexity

API Name: AvgCyclomaticStrict
Description: Average strict cyclomatic complexity 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
Java: Project,File,Class,Interface
Pascal: Project,File,Class,Interface,Compunit
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Average Essential Cyclomatic Complexity

API Name: AvgEssential
Description: Average essential cyclomatic complexity 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
Fortran: Project,File
Java: Project,File,Class,Interface
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Average Essential Strict Modified Complexity

API Name: AvgEssentialStrictModified
Description: Average strict modified essential complexity for all nested functions or methods.
Metric available for:
Ada: Project,File,Package

Click Here To Download Understand!


Back to Top



Paths

API Name: CountPath
Research: NPATH
Description: Number of unique paths though a body of code, not counting abnormal exits or gotos.
Metric available for:
C/C++: Project,Function Detailed Example
C#: Project,Method
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task
Fortran: Project,Module,Block Data,Function,Program,Subroutine
Java: Project,Method
Pascal: Project,Compunit,Function,Procedure
Python: Project,File,Function
Web: Project,File

Click Here To Download Understand!


Back to Top



Cyclomatic Complexity

API Name: Cyclomatic
Research: McCabe Complexity (v(G))
Description: McCabe Cyclomatic complexity as per the original NIST paper on the subject.
Edges - Nodes + Connected Components
McCabe also proved that the cyclomatic complexity of any structured program with only one entrance point and one exit point is equal to the number of decision points contained in that program plus one (refer to section V for the proof).
Understand counts the keywords for decision points (FOR, WHILE, etc) and then adds 1. For a switch statement, each 'case' is counted as 1 and the 'switch' itselfs adds one to the final Cyclomatic Complexity count.
Metric available for:
C/C++: Project,Function Detailed Example
C#: Project,Method
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task
Fortran: Project,Module,Block Data,Function,Program,Subroutine
Java: Project,Method
Jovial: Project,Subroutine
Pascal: Project,Compunit,Function,Procedure
PL/M: Project,Procedure
Python: Project,File,Function
VHDL: Project,Procedure,Function,Process
Cobol: Project,Paragraph,Section
Web: Project,File

Click Here To Download Understand!


Back to Top



Modified Cyclomatic Complexity

API Name: CyclomaticModified
Description: Modified McCabe Cyclomatic complexity. The Cyclomatic Complexity except that each decision in a multi-decision structure (switch in C/Java, Case in Ada, computed Goto and arithmetic if in FORTRAN) statement is not counted and instead the entire multi-way decision structure counts as 1
Metric available for:
C/C++: Project,Function Detailed Example
C#: Project,Method
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task
Fortran: Project,Module,Block Data,Function,Program,Subroutine
Java: Project,Method
Jovial: Project,Subroutine
Pascal: Project,Compunit,Function,Procedure
PL/M: Project,Procedure
Python: Project,File,Function
VHDL: Project,Procedure,Function,Process
Cobol: Project,Paragraph,Section
Web: Project,File

Click Here To Download Understand!


Back to Top



Strict Cyclomatic Complexity

API Name: CyclomaticStrict
Description: Strict cyclomatic complexity. The Cyclomatic Complexity with logical conjunction and logical and in conditional expressions also adding 1 to the complexity for each of their occurrences.
i.e. The statement if (a && b || c) would have a cyclomatic of 1 but a strict cycolmatic of 3
Metric available for:
C/C++: Project,Function Detailed Example
C#: Project,Method
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task
Java: Project,Method
Jovial: Project,Subroutine
Pascal: Project,Compunit,Function,Procedure
Python: Project,File,Function
VHDL: Project,Procedure,Function,Process
Web: Project,File

Click Here To Download Understand!


Back to Top



Essential Complexity

API Name: Essential
Research: ev(G)
Description: Essential complexity is the Cyclomatic complexity after iteratively replacing all well structured control structures with a single statement. Structures such as if-then-else and while loops are considered well structured.
Understand calculate the essential complexity by removing all the structured subgraphs from the control graph and then calculating the complexity. A graph that has only the regular single entry/single exit loops or branches will be reducible to a graph with complexity one. Any branches into or out of a loop or decision will make the graph non-reducible and will have essentialcomplexity > 2. (You never get 2 since a graph with complexity 2 is always reducible to a graph with complexity 1).
Metric available for:
C/C++: Project,Function Detailed Example
C#: Project,Method
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task
Fortran: Project,Module,Block Data,Function,Program,Subroutine
Java: Project,Method
Pascal: Project,Compunit,Function,Procedure
Python: Project,File,Function
Web: Project,File

Click Here To Download Understand!


Back to Top



Essential Strict Modified Complexity

API Name: EssentialStrictModified
Description: Strict Modified Essential complexity. The Cyclomatic complexity with short circuit operators (and then/or else) as unstructured but only adds one for all structured paths through case statements after graph reduction.
Metric available for:
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task

Click Here To Download Understand!


Back to Top



Knots

API Name: Knots
Description: Measure of overlapping jumps. If a piece of code has arrowed lines indicating where every jump in the flow of control occurs, a knot is defined as where two such lines cross each other. The number of knots is proportional to the complexity of the control flow.
Metric available for:
C/C++: Project,Function Detailed Example
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task

Click Here To Download Understand!


Back to Top



Max Cyclomatic Complexity

API Name: MaxCyclomatic
Description: Maximum cyclomatic complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Max Modified Cyclomatic Complexity

API Name: MaxCyclomaticModified
Description: Maximum modified cyclomatic complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Max Strict Cyclomatic Complexity

API Name: MaxCyclomaticStrict
Description: Maximum strict cyclomatic complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit

Click Here To Download Understand!


Back to Top



Max Essential Complexity

API Name: MaxEssential
Description: Maximum essential complexity of all nested functions or methods.
Metric available for:
Ada: Project,File,Package

Click Here To Download Understand!


Back to Top



Max Knots

API Name: MaxEssentialKnots
Description: Maximum Knots after structured programming constructs have been removed.
Metric available for:
C/C++: Project,Function Detailed Example
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task

Click Here To Download Understand!


Back to Top



Max Essential Strict Modified Complexity

API Name: MaxEssentialStrictModified
Description: Maximum strict modified essential complexity of all nested functions or methods.
Metric available for:
Ada: Project,File,Package

Click Here To Download Understand!


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

Click Here To Download Understand!


Back to Top



Nesting

API Name: MaxNesting
Description: Maximum nesting level of control constructs (if, while, for, switch, etc.) in the function.
Metric available for:
C/C++: Project,File,Function Detailed Example
C#: Project,File,Class,Struct,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
Jovial: Project,File,Subroutine
Pascal: Project,File,Class,Interface,Compunit,Function,Procedure
Python: Project,File,Class,Function
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Minimum Knots

API Name: MinEssentialKnots
Description: Minimum Knots after structured programming constructs have been removed.
Metric available for:
C/C++: Project,Function Detailed Example
Ada: Project,Type,Entry,Function,Package,Procedure,Protected,Task

Click Here To Download Understand!


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
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

Click Here To Download Understand!


Back to Top



Sum Cyclomatic Complexity

API Name: SumCyclomatic
Research: Chidamber & Kemerer - Weighted Methods per Class (WCM)
Description: Sum of cyclomatic complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Sum Modified Cyclomatic Complexity

API Name: SumCyclomaticModified
Description: Sum of modified cyclomatic complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Sum Strict Cyclomatic Complexity

API Name: SumCyclomaticStrict
Description: Sum of strict cyclomatic complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Jovial: Project,File
Pascal: Project,File,Class,Interface,Compunit
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Sum Essential Complexity

API Name: SumEssential
Description: Sum of essential complexity of 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
Fortran: Project,File
Java: Project,File,Class,Interface
Python: Project,File,Class
Web: Project,File,PHP Class,PHP Interface

Click Here To Download Understand!


Back to Top



Sum Essential Strict Modified Complexity

API Name: SumEssentialStrictModified
Description: Sum of strict modified essential complexity of all nested functions or methods.
Metric available for:
Ada: Project,File,Package

Click Here To Download Understand!


Back to Top