golang / freetype
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 179 units with 4,472 lines of code in units (83.3% of code).
    • 1 very complex units (1,007 lines of code)
    • 2 complex units (226 lines of code)
    • 12 medium complex units (754 lines of code)
    • 36 simple units (1,319 lines of code)
    • 128 very simple units (1,166 lines of code)
22% | 5% | 16% | 29% | 26%
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
go22% | 5% | 15% | 29% | 26%
c0% | 0% | 96% | 0% | 4%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
truetype40% | 9% | 19% | 9% | 21%
raster0% | 0% | 12% | 59% | 28%
cmd/print-glyph-points0% | 0% | 96% | 0% | 4%
example/freetype0% | 0% | 100% | 0% | 0%
example/genbasicfont0% | 0% | 0% | 65% | 35%
ROOT0% | 0% | 0% | 43% | 56%
example/drawer0% | 0% | 0% | 100% | 0%
example/round0% | 0% | 0% | 92% | 7%
example/capjoin0% | 0% | 0% | 100% | 0%
example/raster0% | 0% | 0% | 49% | 50%
example/truetype0% | 0% | 0% | 0% | 100%
example/gamma0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in truetype/hint.go
1007 303 1
func parse()
in truetype/truetype.go
101 33 2
func()
in truetype/glyph.go
125 27 1
func()
in truetype/hint.go
86 19 1
func()
in truetype/glyph.go
74 19 1
func()
in truetype/glyph.go
78 16 1
func()
in truetype/truetype.go
72 15 1
int main()
in cmd/print-glyph-points/main.c
72 14 2
func()
in truetype/glyph.go
65 14 1
func()
in raster/raster.go
46 14 1
func parseSubtables()
in truetype/truetype.go
29 12 5
func()
in truetype/hint.go
49 11 1
func()
in truetype/hint.go
33 11 1
func main()
in example/freetype/main.go
65 11 0
func()
in raster/raster.go
85 11 1
func main()
in example/drawer/main.go
71 10 0
func main()
in example/genbasicfont/main.go
77 10 0
func()
in raster/paint.go
44 10 1
func Stroke()
in raster/stroke.go
32 10 5
func()
in truetype/face.go
59 9 1