aws / eks-distro
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 41 units with 459 lines of code in units (59.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (141 lines of code)
    • 2 medium size units (83 lines of code)
    • 6 small units (91 lines of code)
    • 31 very small units (144 lines of code)
0% | 30% | 18% | 19% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 30% | 18% | 19% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cmd0% | 82% | 0% | 17% | 0%
cmd/release/number0% | 46% | 32% | 0% | 20%
cmd/release/internal0% | 0% | 32% | 22% | 44%
cmd/release/pull_request0% | 0% | 0% | 68% | 31%
cmd/release/number/internal0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func main()
in cmd/main_postsubmit.go
87 13 0
func main()
in cmd/release/number/main.go
54 12 0
func newRelease()
in cmd/release/internal/release.go
45 5 3
func updateKubeGitVersionFile()
in cmd/release/number/main.go
38 9 1
func()
in cmd/main_postsubmit.go
19 3 1
func determineReleaseNumber()
in cmd/release/internal/release_numbers.go
19 5 1
func()
in cmd/release/pull_request/open_pr.go
16 2 1
func convertFilePaths()
in cmd/release/pull_request/pr_input.go
14 4 1
func determinePreviousReleaseNumber()
in cmd/release/internal/release_numbers.go
12 3 1
func getCommonPullRequest()
in cmd/release/pull_request/pr_input.go
11 2 2
func cleanUpIfError()
in cmd/release/number/main.go
10 3 1
func newPRRequest()
in cmd/release/number/internal/number_pr.go
9 1 4
func NewPullRequestForDocs()
in cmd/release/pull_request/pr_input.go
8 2 1
func NewPullRequestForNumber()
in cmd/release/pull_request/pr_input.go
8 2 1
func initializeRelease()
in cmd/release/number/main.go
8 3 3
func openNumberPR()
in cmd/release/number/internal/number_pr.go
7 2 1
func getGitRootDirectory()
in cmd/release/internal/directories.go
7 2 0
func GetKubernetesReleaseGitTag()
in cmd/release/internal/directories.go
7 2 1
func updateEnvironmentReleaseNumber()
in cmd/release/number/main.go
6 2 2
func NewReleaseWithOverrideNumber()
in cmd/release/internal/release.go
6 2 2