aws-observability / aws-otel-collector
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 70 units with 1,103 lines of code in units (20.7% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (238 lines of code)
    • 11 medium size units (378 lines of code)
    • 20 small units (299 lines of code)
    • 35 very small units (188 lines of code)
0% | 21% | 34% | 27% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 23% | 33% | 26% | 16%
py0% | 0% | 43% | 38% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/workflow0% | 40% | 54% | 5% | 0%
pkg/defaultcomponents0% | 100% | 0% | 0% | 0%
tools/release0% | 18% | 23% | 31% | 25%
pkg/extraconfig0% | 0% | 82% | 0% | 18%
tools/ssm0% | 0% | 100% | 0% | 0%
pkg/userutils0% | 0% | 28% | 60% | 11%
cmd/awscollector0% | 0% | 29% | 39% | 31%
pkg/lambdacomponents0% | 0% | 100% | 0% | 0%
pkg/logger0% | 0% | 0% | 80% | 20%
e2etest0% | 0% | 0% | 67% | 32%
tools/version0% | 0% | 0% | 81% | 18%
pkg/config0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func Components()
in pkg/defaultcomponents/defaults.go
75 10 0
func main()
in tools/release/adot-operator-images-mirror/main.go
56 11 0
func destroyIamRoles()
in tools/workflow/clean_aws_resources.go
54 18 0
func destroyECSLaunchConfiguration()
in tools/workflow/clean_aws_resources.go
53 12 0
func()
in tools/release/adot-operator-images-mirror/mirror.go
42 10 1
func GetExtraConfig()
in pkg/extraconfig/extraconfig.go
41 12 0
func destroyECSAutoScaling()
in tools/workflow/clean_aws_resources.go
41 9 0
func terminateEc2Instances()
in tools/workflow/clean_aws_resources.go
39 10 0
func destroyLoadBalancerResource()
in tools/workflow/clean_aws_resources.go
36 9 0
def buildssmpkg()
in tools/ssm/ssm_manifest.py
35 7 5
func chownRecursive()
in pkg/userutils/userutil_linux.go
30 10 3
func Components()
in pkg/lambdacomponents/defaults.go
29 3 0
func destroyEfsResource()
in tools/workflow/clean_aws_resources.go
29 9 0
func main()
in cmd/awscollector/main.go
29 6 0
func()
in tools/release/adot-operator-images-mirror/ecr_manager.go
27 8 1
func switchUser()
in pkg/userutils/userutil_linux.go
20 5 1
func WrapCoreOpt()
in pkg/logger/logger.go
19 2 0
func()
in tools/release/adot-operator-images-mirror/mirror.go
19 6 1
func getDockerCredentials()
in tools/release/adot-operator-images-mirror/docker_auth.go
19 4 1
func ChangeUser()
in pkg/userutils/userutil_linux.go
18 4 0