awslabs / amazon-ecs-for-open-application-model
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 167 units with 1,619 lines of code in units (62.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (105 lines of code)
    • 10 simple units (249 lines of code)
    • 155 very simple units (1,265 lines of code)
0% | 0% | 6% | 15% | 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% | 6% | 15% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/pkg/workload0% | 0% | 100% | 0% | 0%
internal/pkg/term0% | 0% | 13% | 0% | 86%
internal/pkg/deploy0% | 0% | 0% | 29% | 70%
internal/pkg/cli0% | 0% | 0% | 6% | 93%
internal/pkg/aws0% | 0% | 0% | 0% | 100%
cmd/oam-ecs0% | 0% | 0% | 0% | 100%
templates0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func HumanizeResourceEvents()
in internal/pkg/term/progress/deploy/cloudformation/deploy.go
43 14 4
func NewOamWorkload()
in internal/pkg/workload/workload.go
62 13 1
func()
in internal/pkg/deploy/cloudformation/component.go
32 8 1
func()
in internal/pkg/deploy/cloudformation/env.go
32 8 1
func()
in internal/pkg/deploy/cloudformation/component.go
30 7 1
func()
in internal/pkg/deploy/cloudformation/env.go
30 7 1
func()
in internal/pkg/cli/app_deploy.go
28 7 1
func()
in internal/pkg/deploy/cloudformation/changeset.go
23 6 1
func()
in internal/pkg/deploy/cloudformation/cloudformation.go
27 6 1
func()
in internal/pkg/deploy/cloudformation/cloudformation.go
20 6 1
func resolveOAMParameterValue()
in internal/pkg/deploy/cloudformation/stack/template_functions.go
16 6 3
func resolveHealthCheckGracePeriod()
in internal/pkg/deploy/cloudformation/stack/template_functions.go
11 6 1
func getValidFargateTaskSizes()
in internal/pkg/deploy/cloudformation/stack/template_functions.go
20 5 0
func getNearestFargateTaskSize()
in internal/pkg/deploy/cloudformation/stack/template_functions.go
14 5 1
func()
in internal/pkg/term/progress/spinner.go
26 5 1
func()
in internal/pkg/deploy/cloudformation/changeset.go
26 4 1
func()
in internal/pkg/deploy/cloudformation/component.go
19 4 1
func()
in internal/pkg/deploy/cloudformation/cloudformation.go
14 4 1
func stackDoesNotExist()
in internal/pkg/deploy/cloudformation/cloudformation.go
11 4 1
func()
in internal/pkg/deploy/cloudformation/env.go
19 4 1