awslabs / amazon-ecs-local-container-endpoints
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 1,186 units with 8,043 lines of code in units (95.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (32 lines of code)
    • 8 simple units (197 lines of code)
    • 1,177 very simple units (7,814 lines of code)
0% | 0% | <1% | 2% | 97%
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% | 2% | 97%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
local-container-endpoints/handlers0% | 0% | 6% | 37% | 56%
local-container-endpoints/clients/iam0% | 0% | 0% | 0% | 100%
local-container-endpoints/clients/sts0% | 0% | 0% | 0% | 100%
local-container-endpoints/testingutils0% | 0% | 0% | 0% | 100%
local-container-endpoints/metadata0% | 0% | 0% | 0% | 100%
infra0% | 0% | 0% | 0% | 100%
local-container-endpoints/clients/docker0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
local-container-endpoints/utils0% | 0% | 0% | 0% | 100%
local-container-endpoints/clients/useragent0% | 0% | 0% | 0% | 100%
local-container-endpoints/version0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func filterContainersByMyNetworks()
in local-container-endpoints/handlers/metadata.go
32 13 3
func NewCredentialService()
in local-container-endpoints/handlers/credentials_handler.go
38 8 0
func()
in local-container-endpoints/handlers/credentials_handler.go
35 7 1
func()
in local-container-endpoints/handlers/metadata.go
32 7 1
func()
in local-container-endpoints/handlers/metadata.go
28 7 1
func filterContainersByRequestIP()
in local-container-endpoints/handlers/metadata.go
17 7 2
func()
in local-container-endpoints/handlers/credentials_handler.go
9 6 1
func findContainer()
in local-container-endpoints/handlers/metadata.go
20 6 3
func filterContainersByIdentifier()
in local-container-endpoints/handlers/metadata.go
18 6 2
func()
in local-container-endpoints/handlers/metadata_handler.go
13 5 1
func networkMatches()
in local-container-endpoints/handlers/metadata.go
13 5 3
constructor()
in infra/pipeline.ts
87 5 3
23 5 1
func getSharedTokenExpiration()
in local-container-endpoints/handlers/credentials_handler.go
21 4 0
func()
in local-container-endpoints/handlers/metadata.go
19 4 1
func()
in local-container-endpoints/handlers/metadata.go
22 4 1
func filterByComposeProject()
in local-container-endpoints/handlers/metadata.go
12 4 2
func convertNetworks()
in local-container-endpoints/metadata/metadata.go
20 4 1
func main()
in main.go
27 4 0
func GetTagsMap()
in local-container-endpoints/utils/utils.go
12 3 1