aws / eks-distro-build-tooling
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 82 units with 1,493 lines of code in units (32.0% of code).
    • 1 very long units (202 lines of code)
    • 4 long units (278 lines of code)
    • 16 medium size units (487 lines of code)
    • 17 small units (237 lines of code)
    • 44 very small units (289 lines of code)
13% | 18% | 32% | 15% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go16% | 16% | 32% | 12% | 22%
js0% | 28% | 33% | 30% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
release/pkg21% | 21% | 42% | 7% | 7%
generate-attribution0% | 28% | 33% | 30% | 7%
release/api/v1alpha10% | 0% | 0% | 19% | 80%
release/cmd0% | 0% | 0% | 62% | 37%
release0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in release/pkg/assets_k8s.go
202 18 1
async function populateVersionAndModuleFromDep()
in generate-attribution/generate-attribution-file.js
85 26 1
func()
in release/pkg/assets_authenticator.go
72 6 1
func()
in release/pkg/assets_etcd.go
69 6 1
func()
in release/pkg/assets_cni.go
52 6 1
func parseKubeGitVersionContent()
in release/pkg/kube_reader.go
43 13 1
func()
in release/pkg/assets_snapshotter.go
34 3 1
async function getPackageRepo()
in generate-attribution/generate-attribution-file.js
33 4 1
func()
in release/pkg/assets_registrar.go
32 2 1
func()
in release/pkg/assets_coredns.go
32 2 1
func()
in release/pkg/assets_livenessprobe.go
32 2 1
func()
in release/pkg/assets_resizer.go
32 2 1
func()
in release/pkg/assets_attacher.go
32 2 1
func()
in release/pkg/assets_provisioner.go
32 2 1
func()
in release/pkg/assets_metricsserver.go
32 2 1
func parseReleaseForUri()
in release/pkg/get_artifact_uri.go
30 12 5
func UpdateImageDigests()
in release/pkg/generate_spec.go
30 5 3
async function groupByLicense()
in generate-attribution/generate-attribution-file.js
26 7 1
func()
in release/pkg/generate_spec.go
25 3 1
async function readLicenseContent()
in generate-attribution/generate-attribution-file.js
21 4 2