awslabs / amazon-apigateway-ingress-controller
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 76 units with 1,228 lines of code in units (67.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (133 lines of code)
    • 7 simple units (234 lines of code)
    • 67 very simple units (861 lines of code)
0% | 0% | 10% | 19% | 70%
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% | 0% | 10% | 19% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/controller0% | 0% | 11% | 20% | 68%
pkg/network0% | 0% | 88% | 0% | 11%
pkg/cloudformation0% | 0% | 0% | 12% | 87%
cmd/manager0% | 0% | 0% | 100% | 0%
pkg/finalizers0% | 0% | 0% | 0% | 100%
pkg/nginx0% | 0% | 0% | 0% | 100%
pkg/webhook0% | 0% | 0% | 0% | 100%
pkg/logging0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/controller/ingress/ingress_controller.go
87 22 1
46 12 3
func()
in pkg/controller/ingress/ingress_controller.go
38 8 1
func()
in pkg/controller/ingress/ingress_controller.go
29 8 1
func()
in pkg/controller/ingress/ingress_controller.go
37 7 1
func BuildApiGatewayTemplateFromIngressRule()
in pkg/cloudformation/cloudformation.go
38 6 1
func()
in pkg/controller/ingress/ingress_controller.go
28 6 1
func()
in pkg/controller/ingress/ingress_controller.go
28 6 1
func main()
in cmd/manager/main.go
36 6 0
func mapApiGatewayMethodsAndResourcesFromPaths()
in pkg/cloudformation/cloudformation.go
20 5 1
func IsDoesNotExist()
in pkg/cloudformation/helpers.go
10 5 2
func()
in pkg/controller/ingress/ingress_controller.go
43 5 1
func()
in pkg/controller/ingress/ingress_controller.go
41 5 1
func GetResourceID()
in pkg/cloudformation/helpers.go
14 4 3
func getAWSSession()
in pkg/controller/ingress/ingress_controller.go
21 4 1
func BuildNginxConfig()
in pkg/nginx/nginx.go
15 3 1
func IsFailed()
in pkg/cloudformation/helpers.go
8 3 1
func IsComplete()
in pkg/cloudformation/helpers.go
8 3 1
func IsPending()
in pkg/cloudformation/helpers.go
8 3 1
func StackDoesNotExist()
in pkg/cloudformation/helpers.go
9 3 1