aws-quickstart / quickstart-compliance-irap-protected
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 698 units with 7,016 lines of code in units (67.7% of code).
    • 4 very long units (439 lines of code)
    • 10 long units (716 lines of code)
    • 65 medium size units (1,953 lines of code)
    • 114 small units (1,619 lines of code)
    • 505 very small units (2,289 lines of code)
6% | 10% | 27% | 23% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py6% | 10% | 27% | 23% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/populate_NLB_TG_with_ALB/dns8% | 12% | 29% | 18% | 30%
functions/source/populate_NLB_TG_with_ALB/dns/rdtypes/ANY0% | 7% | 27% | 30% | 34%
functions/source/populate_NLB_TG_with_ALB/dns/rdtypes/IN0% | 0% | 29% | 30% | 40%
functions/source/populate_NLB_TG_with_ALB0% | 0% | 23% | 68% | 8%
functions/source/populate_NLB_TG_with_ALB/dns/rdtypes0% | 0% | 0% | 40% | 59%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def query()
in functions/source/populate_NLB_TG_with_ALB/dns/resolver.py
129 39 8
def _validate_rrsig()
in functions/source/populate_NLB_TG_with_ALB/dns/dnssec.py
105 15 5
def xfr()
in functions/source/populate_NLB_TG_with_ALB/dns/query.py
103 29 16
def get()
in functions/source/populate_NLB_TG_with_ALB/dns/tokenizer.py
102 39 3
def from_text()
in functions/source/populate_NLB_TG_with_ALB/dns/rdtypes/ANY/LOC.py
95 32 6
def _getaddrinfo()
in functions/source/populate_NLB_TG_with_ALB/dns/resolver.py
93 40 6
def _get_section()
in functions/source/populate_NLB_TG_with_ALB/dns/message.py
91 24 3
def _generate_line()
in functions/source/populate_NLB_TG_with_ALB/dns/zone.py
88 23 1
def read()
in functions/source/populate_NLB_TG_with_ALB/dns/zone.py
72 20 1
def _rr_line()
in functions/source/populate_NLB_TG_with_ALB/dns/zone.py
62 17 1
def from_text()
in functions/source/populate_NLB_TG_with_ALB/dns/name.py
56 22 3
def from_unicode()
in functions/source/populate_NLB_TG_with_ALB/dns/name.py
55 22 3
def __init__()
in functions/source/populate_NLB_TG_with_ALB/dns/resolver.py
53 22 6
def inet_ntoa()
in functions/source/populate_NLB_TG_with_ALB/dns/ipv6.py
51 3 1
def from_text()
in functions/source/populate_NLB_TG_with_ALB/dns/rdtypes/ANY/NSEC3.py
48 11 6
def sign()
in functions/source/populate_NLB_TG_with_ALB/dns/tsig.py
44 8 13
def validate()
in functions/source/populate_NLB_TG_with_ALB/dns/tsig.py
44 11 11
def inet_aton()
in functions/source/populate_NLB_TG_with_ALB/dns/ipv6.py
44 18 1
def _rr_line()
in functions/source/populate_NLB_TG_with_ALB/dns/message.py
44 13 2
def _header_line()
in functions/source/populate_NLB_TG_with_ALB/dns/message.py
43 15 2