golang / geo
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 1,180 units with 9,846 lines of code in units (89.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (79 lines of code)
    • 22 medium complex units (922 lines of code)
    • 112 simple units (2,547 lines of code)
    • 1,045 very simple units (6,298 lines of code)
0% | <1% | 9% | 25% | 63%
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% | <1% | 9% | 25% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
s20% | <1% | 10% | 25% | 62%
s10% | 0% | 0% | 44% | 55%
r30% | 0% | 0% | 10% | 89%
r20% | 0% | 0% | 0% | 100%
r10% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in s2/shapeindex.go
79 27 1
func()
in s2/shapeindex.go
64 19 1
func()
in s2/shapeindex.go
74 19 1
func()
in s2/edge_query.go
60 16 1
func()
in s2/edge_crosser.go
34 16 1
func()
in s2/rect.go
47 16 1
func()
in s2/regioncoverer.go
52 16 1
func()
in s2/regioncoverer.go
42 16 1
func()
in s2/contains_point_query.go
40 14 1
37 14 3
func()
in s2/polygon.go
46 14 1
func()
in s2/edge_query.go
40 13 1
func()
in s2/cell.go
40 13 1
51 13 4
func()
in s2/regioncoverer.go
23 13 1
func()
in s2/edge_query.go
30 12 1
43 12 3
func faceXYZToUV()
in s2/stuv.go
30 12 2
37 11 1
func()
in s2/loop.go
23 11 1