aws / amazon-ecs-agent
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 4,862 units with 39,629 lines of code in units (77.5% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (255 lines of code)
    • 53 medium complex units (2,730 lines of code)
    • 217 simple units (6,325 lines of code)
    • 4,590 very simple units (30,319 lines of code)
0% | <1% | 6% | 15% | 76%
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% | <1% | 6% | 15% | 76%
c0% | 0% | 0% | 69% | 30%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
agent/engine0% | 3% | 13% | 19% | 63%
agent/ecs_client0% | 1% | 1% | 4% | 92%
agent/api0% | 0% | 10% | 20% | 69%
agent/app0% | 0% | 17% | 18% | 63%
agent/dockerclient0% | 0% | 10% | 13% | 76%
agent/stats0% | 0% | 13% | 36% | 50%
agent/taskresource0% | 0% | 2% | 11% | 86%
agent/acs0% | 0% | 5% | 21% | 73%
agent/wsclient0% | 0% | 18% | 21% | 59%
agent/utils0% | 0% | 8% | 19% | 71%
agent/handlers0% | 0% | 3% | 29% | 66%
agent/tcs0% | 0% | 5% | 28% | 66%
misc/netkitten0% | 0% | 100% | 0% | 0%
agent/config0% | 0% | 4% | 14% | 80%
agent/eni0% | 0% | 4% | 24% | 70%
agent/eventhandler0% | 0% | 0% | 32% | 67%
agent/ecscni0% | 0% | 0% | 14% | 85%
agent/statemanager0% | 0% | 0% | 36% | 63%
agent/logger0% | 0% | 0% | 10% | 89%
agent/gogenerate0% | 0% | 0% | 38% | 61%
agent/containermetadata0% | 0% | 0% | 9% | 90%
agent/asm0% | 0% | 0% | 3% | 96%
agent/sighandlers0% | 0% | 0% | 33% | 66%
misc/pause-container0% | 0% | 0% | 69% | 30%
agent/ec20% | 0% | 0% | 0% | 100%
agent/data0% | 0% | 0% | 0% | 100%
agent/ecr0% | 0% | 0% | 0% | 100%
agent/metrics0% | 0% | 0% | 0% | 100%
agent/doctor0% | 0% | 0% | 0% | 100%
agent/gpu0% | 0% | 0% | 0% | 100%
agent/credentials0% | 0% | 0% | 0% | 100%
agent/async0% | 0% | 0% | 0% | 100%
agent/httpclient0% | 0% | 0% | 0% | 100%
agent/s30% | 0% | 0% | 0% | 100%
agent/ssm0% | 0% | 0% | 0% | 100%
agent/fsx0% | 0% | 0% | 0% | 100%
agent/eventstream0% | 0% | 0% | 0% | 100%
misc/gremlin0% | 0% | 0% | 0% | 100%
agent/version0% | 0% | 0% | 0% | 100%
misc/exec-command-agent-test0% | 0% | 0% | 0% | 100%
agent0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in agent/engine/docker_task_engine.go
183 44 1
func()
in agent/ecs_client/model/ecs/api.go
72 28 1
func ContainersEqual()
in agent/api/testutils/container_equal.go
57 23 2
func()
in agent/engine/docker_task_engine.go
92 23 1
func()
in agent/ecs_client/model/ecs/api.go
58 22 1
func()
in agent/tcs/model/ecstcs/api.go
57 22 1
func()
in agent/app/agent.go
96 20 1
func()
in agent/stats/engine.go
67 17 1
func()
in agent/api/task/task.go
62 16 1
func()
in agent/dockerclient/dockerapi/docker_client.go
83 16 1
func()
in agent/utils/compare_versions.go
47 15 1
func containerOrderingDependenciesIsResolved()
in agent/engine/dependencygraph/graph.go
35 15 4
func()
in agent/dockerclient/dockerapi_compare_versions.go
47 15 1
func MetadataFromContainer()
in agent/dockerclient/dockerapi/docker_client.go
52 15 1
func()
in agent/ecs_client/model/ecs/api.go
37 14 1
func()
in agent/api/task/task.go
57 14 1
func()
in agent/api/task/task.go
57 14 1
func()
in agent/config/config.go
49 14 1
func()
in agent/acs/handler/payload_handler.go
71 14 1
func()
in agent/taskresource/firelens/firelensconfig_unix.go
69 14 1