aws-quickstart / quickstart-mongodb-atlas-resources
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 162 units with 3,005 lines of code in units (68.7% of code).
    • 3 very long units (374 lines of code)
    • 9 long units (612 lines of code)
    • 45 medium size units (1,377 lines of code)
    • 19 small units (282 lines of code)
    • 86 very small units (360 lines of code)
12% | 20% | 45% | 9% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go12% | 20% | 45% | 9% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cfn-resources/cluster59% | 0% | 19% | 8% | 11%
cfn-resources/database-user0% | 77% | 16% | 0% | 5%
cfn-resources/network-peering0% | 53% | 39% | 0% | 6%
cfn-resources/testutil0% | 55% | 25% | 8% | 10%
cfn-resources/project-ip-access-list0% | 0% | 71% | 21% | 7%
cfn-resources/project0% | 0% | 86% | 0% | 13%
cfn-resources/cloud-provider-snapshot-restore-jobs0% | 0% | 81% | 0% | 18%
cfn-resources/cloud-provider-snapshots0% | 0% | 80% | 8% | 11%
cfn-resources/util0% | 0% | 40% | 46% | 12%
cfn-resources/encryption-at-rest0% | 0% | 60% | 13% | 26%
cfn-resources/network-container0% | 0% | 55% | 14% | 30%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func Create()
in cfn-resources/cluster/cmd/resource/resource.go
146 23 3
func Read()
in cfn-resources/cluster/cmd/resource/resource.go
123 18 3
func Update()
in cfn-resources/cluster/cmd/resource/resource.go
105 18 3
func Create()
in cfn-resources/database-user/cmd/resource/resource.go
96 14 3
func Test()
in cfn-resources/testutil/testutil.go
92 20 2
func Update()
in cfn-resources/database-user/cmd/resource/resource.go
73 9 3
func Read()
in cfn-resources/database-user/cmd/resource/resource.go
64 7 3
func Create()
in cfn-resources/network-peering/cmd/resource/resource.go
61 10 3
func Update()
in cfn-resources/network-peering/cmd/resource/resource.go
60 10 3
func List()
in cfn-resources/database-user/cmd/resource/resource.go
56 6 3
func validateOrCreateNetworkContainer()
in cfn-resources/network-peering/cmd/resource/resource.go
55 12 3
func Read()
in cfn-resources/network-peering/cmd/resource/resource.go
55 8 3
func Create()
in cfn-resources/cloud-provider-snapshot-restore-jobs/cmd/resource/resource.go
50 11 3
func Read()
in cfn-resources/project/cmd/resource/resource.go
49 6 3
func List()
in cfn-resources/network-peering/cmd/resource/resource.go
47 6 3
func Delete()
in cfn-resources/project/cmd/resource/resource.go
46 7 3
func Delete()
in cfn-resources/cluster/cmd/resource/resource.go
44 6 3
func List()
in cfn-resources/network-container/cmd/resource/resource.go
42 6 3
func List()
in cfn-resources/cloud-provider-snapshot-restore-jobs/cmd/resource/resource.go
42 4 3
func Delete()
in cfn-resources/network-peering/cmd/resource/resource.go
41 6 3