kubernetes / org
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 18 units with 252 lines of code in units (2.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (152 lines of code)
    • 4 small units (46 lines of code)
    • 9 very small units (54 lines of code)
0% | 0% | 60% | 18% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 56% | 16% | 26%
go0% | 0% | 65% | 20% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
hack/boilerplate0% | 0% | 56% | 16% | 26%
cmd/merge0% | 0% | 65% | 20% | 14%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
func loadOrgs()
in cmd/merge/main.go
43 15 1
def file_passes()
in hack/boilerplate/verify_boilerplate.py
38 18 3
func main()
in cmd/merge/main.go
26 6 0
def get_args()
in hack/boilerplate/verify_boilerplate.py
24 1 0
def get_files()
in hack/boilerplate/verify_boilerplate.py
21 11 1
def get_refs()
in hack/boilerplate/verify_boilerplate.py
12 4 0
def main()
in hack/boilerplate/verify_boilerplate.py
12 5 0
func()
in cmd/merge/main.go
11 3 1
func unmarshal()
in cmd/merge/main.go
11 3 1
def normalize_files()
in hack/boilerplate/verify_boilerplate.py
10 6 1
func()
in cmd/merge/main.go
8 2 1
def get_regexs()
in hack/boilerplate/verify_boilerplate.py
8 3 0
func parseKeyValue()
in cmd/merge/main.go
7 2 1
def has_ignored_header()
in hack/boilerplate/verify_boilerplate.py
7 4 1
def is_generated()
in hack/boilerplate/verify_boilerplate.py
5 3 1
def nonconforming_lines()
in hack/boilerplate/verify_boilerplate.py
4 2 1
def get_dates()
in hack/boilerplate/verify_boilerplate.py
3 2 0
def file_extension()
in hack/boilerplate/verify_boilerplate.py
2 1 1