aws / amazon-ecs-init
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 303 units with 2,552 lines of code in units (58.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (101 lines of code)
    • 14 simple units (438 lines of code)
    • 287 very simple units (2,013 lines of code)
0% | 0% | 3% | 17% | 78%
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% | 3% | 17% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ecs-init/volumes0% | 0% | 12% | 19% | 67%
ecs-init/engine0% | 0% | 9% | 10% | 80%
ecs-init/docker0% | 0% | 0% | 18% | 81%
scripts/changelog0% | 0% | 0% | 28% | 71%
ecs-init/exec0% | 0% | 0% | 11% | 88%
ecs-init0% | 0% | 0% | 48% | 51%
ecs-init/gpu0% | 0% | 0% | 15% | 85%
ecs-init/config0% | 0% | 0% | 15% | 84%
ecs-init/backoff0% | 0% | 0% | 0% | 100%
ecs-init/version0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in ecs-init/volumes/ecs_volume_plugin.go
62 12 1
func()
in ecs-init/engine/engine.go
39 11 1
func()
in ecs-init/engine/engine.go
44 10 1
func main()
in ecs-init/ecs-init.go
39 9 0
func newDockerClient()
in ecs-init/docker/dependencies.go
27 8 2
func AgentDockerLogDriverConfiguration()
in ecs-init/config/common.go
30 7 0
func()
in ecs-init/gpu/nvidia_gpu_manager.go
30 7 1
func saveState()
in ecs-init/volumes/state_manager.go
27 7 1
func()
in ecs-init/volumes/ecs_volume_plugin.go
37 7 1
func()
in ecs-init/docker/docker.go
18 7 1
func()
in ecs-init/docker/docker.go
31 7 1
func()
in ecs-init/exec/iptables/iptables.go
19 6 1
func()
in ecs-init/exec/iptables/iptables.go
22 6 1
func()
in ecs-init/volumes/ecs_volume_plugin.go
33 6 1
func()
in ecs-init/docker/docker.go
36 6 1
func main()
in scripts/changelog/changelog.go
45 6 0
func()
in ecs-init/gpu/nvidia_gpu_manager.go
20 5 1
func New()
in ecs-init/engine/engine.go
26 5 0
func()
in ecs-init/engine/engine.go
17 5 1
func setOptions()
in ecs-init/volumes/ecs_volume_driver.go
14 5 1