aws / eks-distro-prow-jobs
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 23 units with 466 lines of code in units (6.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (94 lines of code)
    • 6 medium size units (194 lines of code)
    • 7 small units (105 lines of code)
    • 9 very small units (73 lines of code)
0% | 20% | 41% | 22% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 20% | 41% | 22% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
linter0% | 33% | 19% | 23% | 23%
templater/jobs/utils0% | 0% | 84% | 15% | 0%
templater0% | 0% | 55% | 34% | 9%
templater/jobs0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func main()
in linter/main.go
94 21 0
func main()
in templater/main.go
46 7 0
func UnmarshalJobs()
in templater/jobs/utils/utils.go
45 10 1
28 9 1
func GetJobList()
in templater/jobs/jobs.go
27 7 1
26 9 1
func ExecuteTemplate()
in templater/jobs/utils/utils.go
22 3 2
func()
in linter/main.go
17 3 1
func getFilesChanged()
in linter/main.go
17 8 3
17 4 1
func GenerateProwjob()
in templater/main.go
17 4 3
func unmarshalJobFile()
in linter/main.go
13 2 2
func GetJobsByType()
in templater/jobs/utils/utils.go
12 3 2
func useTemplate()
in templater/main.go
12 4 1
func findLineNumber()
in linter/main.go
9 3 2
func AlwaysRunCheck()
in linter/main.go
8 2 0
func SkipReportCheck()
in linter/main.go
8 2 0
8 2 1
8 2 1
8 2 1