aws-cloudformation / aws-cloudformation-resource-providers-aps
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 33 units with 793 lines of code in units (75.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (149 lines of code)
    • 14 medium size units (450 lines of code)
    • 8 small units (133 lines of code)
    • 9 very small units (61 lines of code)
0% | 18% | 56% | 16% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 18% | 56% | 16% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws-aps-workspace/cmd/resource0% | 18% | 64% | 11% | 5%
aws-aps-rulegroupsnamespace/cmd/resource0% | 24% | 50% | 15% | 9%
internal0% | 0% | 36% | 52% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func Update()
in aws-aps-workspace/cmd/resource/resource.go
86 15 3
func Update()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
63 9 3
func Create()
in aws-aps-workspace/cmd/resource/resource.go
44 8 3
func manageAlertManagerDefinition()
in aws-aps-workspace/cmd/resource/resource.go
44 9 3
func Delete()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
42 5 3
func Create()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
41 7 3
func Delete()
in aws-aps-workspace/cmd/resource/resource.go
39 5 3
func List()
in aws-aps-workspace/cmd/resource/resource.go
35 5 3
func validateAlertManagerState()
in aws-aps-workspace/cmd/resource/resource.go
35 5 4
func NewFailedEvent()
in internal/aps.go
30 6 1
func Read()
in aws-aps-workspace/cmd/resource/resource.go
27 6 3
func validateAlertManagerDeleted()
in aws-aps-workspace/cmd/resource/resource.go
26 5 3
func readRuleGroupsNamespaceDefinition()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
23 3 2
func validateWorkspaceState()
in aws-aps-workspace/cmd/resource/resource.go
22 3 4
func validateRuleGroupsNamespaceDeleted()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
21 4 3
func validateWorkspaceDeleted()
in aws-aps-workspace/cmd/resource/resource.go
21 4 3
func validateRuleGroupsNamespaceState()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
20 3 4
func Read()
in aws-aps-rulegroupsnamespace/cmd/resource/resource.go
19 3 3
func readWorkspace()
in aws-aps-workspace/cmd/resource/resource.go
18 3 2
func readAlertManagerDefinition()
in aws-aps-workspace/cmd/resource/resource.go
17 3 2