golang / appengine
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 8,148 units with 38,970 lines of code in units (69.2% of code).
    • 4 very complex units (970 lines of code)
    • 10 complex units (976 lines of code)
    • 69 medium complex units (3,714 lines of code)
    • 119 simple units (3,235 lines of code)
    • 7,946 very simple units (30,075 lines of code)
2% | 2% | 9% | 8% | 77%
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
go2% | 2% | 9% | 8% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
v23% | 3% | 9% | 8% | 75%
cmd28% | 5% | 23% | 16% | 25%
datastore0% | 13% | 31% | 15% | 39%
aetest0% | 43% | 0% | 13% | 42%
search0% | 0% | 31% | 42% | 25%
internal0% | 0% | 1% | 1% | 97%
taskqueue0% | 0% | 32% | 31% | 35%
blobstore0% | 0% | 34% | 17% | 47%
remote_api0% | 0% | 36% | 30% | 32%
urlfetch0% | 0% | 58% | 0% | 41%
memcache0% | 0% | 21% | 25% | 53%
socket0% | 0% | 25% | 11% | 62%
delay0% | 0% | 32% | 54% | 13%
log0% | 0% | 33% | 10% | 56%
xmpp0% | 0% | 0% | 69% | 30%
mail0% | 0% | 0% | 82% | 17%
runtime0% | 0% | 0% | 33% | 66%
ROOT0% | 0% | 0% | 13% | 86%
image0% | 0% | 0% | 66% | 33%
user0% | 0% | 0% | 0% | 100%
module0% | 0% | 0% | 0% | 100%
channel0% | 0% | 0% | 0% | 100%
capability0% | 0% | 0% | 0% | 100%
file0% | 0% | 0% | 0% | 100%
cloudsql0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func typecheck1()
in cmd/aefix/typecheck.go
275 104 4
func typecheck1()
in v2/cmd/aefix/typecheck.go
275 104 4
func walkBeforeAfter()
in cmd/aefix/fix.go
210 89 3
func walkBeforeAfter()
in v2/cmd/aefix/fix.go
210 89 3
func setVal()
in datastore/load.go
98 39 2
func setVal()
in v2/datastore/load.go
98 39 2
func()
in aetest/instance_vm.go
117 34 1
func()
in v2/aetest/instance.go
113 33 1
func getStructCodecLocked()
in datastore/prop.go
98 31 1
func getStructCodecLocked()
in v2/datastore/prop.go
98 31 1
func aeFn()
in cmd/aefix/ae.go
93 30 1
func aeFn()
in v2/cmd/aefix/ae.go
93 30 1
func()
in datastore/load.go
84 26 1
func()
in v2/datastore/load.go
84 26 1
func propertiesToProto()
in datastore/save.go
79 25 3
func propertiesToProto()
in v2/datastore/save.go
79 25 3
func valueToProto()
in datastore/save.go
71 24 4
func valueToProto()
in v2/datastore/save.go
71 24 4
func ParseUpload()
in v2/blobstore/blobstore.go
92 24 1
func ParseUpload()
in blobstore/blobstore.go
92 24 1