kubernetes / gengo
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 141 units with 1,785 lines of code in units (79.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (143 lines of code)
    • 7 medium complex units (410 lines of code)
    • 12 simple units (329 lines of code)
    • 121 very simple units (903 lines of code)
0% | 8% | 22% | 18% | 50%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 8% | 22% | 18% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
parser0% | 22% | 15% | 27% | 34%
namer0% | 0% | 50% | 12% | 37%
generator0% | 0% | 25% | 12% | 61%
types0% | 0% | 0% | 25% | 74%
args0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in parser/parse.go
143 31 1
func()
in namer/namer.go
74 22 1
func()
in generator/execute.go
84 21 1
func()
in namer/namer.go
78 18 1
func()
in parser/parse.go
59 17 1
func()
in namer/plural_namer.go
41 12 1
func transitiveClosure()
in generator/transitive_closure.go
35 12 1
func()
in parser/parse.go
39 12 1
func FlattenMembers()
in types/flatten.go
33 10 1
func()
in generator/execute.go
33 10 1
func()
in parser/parse.go
33 10 1
func()
in parser/parse.go
39 10 1
func tcNameToName()
in parser/parse.go
18 10 1
func()
in namer/import_tracker.go
27 8 1
func()
in parser/parse.go
27 8 1
func()
in namer/order.go
21 6 1
func ExtractCommentTags()
in types/comments.go
19 6 2
func assembleGolangFile()
in generator/execute.go
26 6 2
func()
in parser/parse.go
20 6 1
func()
in parser/parse.go
33 6 1