awslabs / fargatecli
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 3,880 units with 26,355 lines of code in units (91.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (244 lines of code)
    • 23 simple units (840 lines of code)
    • 3,853 very simple units (25,271 lines of code)
0% | 0% | <1% | 3% | 95%
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% | <1% | 3% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd0% | 0% | 12% | 30% | 56%
ecs0% | 0% | 0% | 29% | 70%
elbv20% | 0% | 0% | 2% | 97%
cloudwatchlogs0% | 0% | 0% | 61% | 38%
ec20% | 0% | 0% | 0% | 100%
route530% | 0% | 0% | 0% | 100%
acm0% | 0% | 0% | 0% | 100%
console0% | 0% | 0% | 0% | 100%
ecr0% | 0% | 0% | 0% | 100%
docker0% | 0% | 0% | 0% | 100%
iam0% | 0% | 0% | 0% | 100%
git0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func getServiceInfo()
in cmd/service_info.go
111 22 1
33 14 2
func listServices()
in cmd/service_list.go
54 11 0
func newLBCreateOperation()
in cmd/lb_create.go
46 11 10
func()
in cmd/lb_create.go
30 10 1
func()
in cmd/certificate_validate.go
48 10 1
func()
in ecs/task.go
54 9 1
func()
in ecs/service.go
71 9 1
func()
in cmd/service_scale.go
24 9 1
func createService()
in cmd/service_create.go
85 9 1
func getTaskInfo()
in cmd/task_info.go
43 9 1
func()
in elbv2/listener.go
42 8 1
func destroyService()
in cmd/service_destroy.go
40 8 1
44 8 1
func()
in cloudwatchlogs/log_group.go
39 7 1
func()
in cmd/lb_create.go
28 7 1
func()
in cmd/service_create.go
19 7 1
func()
in cmd/service_create.go
27 7 1
func()
in cmd/lb_list.go
35 7 1
func()
in cmd/certificate_list.go
33 7 1