aws-quickstart / quickstart-compliance-irap-protected
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 698 units with 7,016 lines of code in units (67.7% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (522 lines of code)
    • 29 medium complex units (1,273 lines of code)
    • 64 simple units (1,400 lines of code)
    • 600 very simple units (3,821 lines of code)
0% | 7% | 18% | 19% | 54%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 7% | 18% | 19% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/populate_NLB_TG_with_ALB/dns0% | 8% | 24% | 18% | 47%
functions/source/populate_NLB_TG_with_ALB/dns/rdtypes/ANY0% | 7% | 3% | 23% | 64%
functions/source/populate_NLB_TG_with_ALB/dns/rdtypes/IN0% | 0% | 0% | 33% | 66%
functions/source/populate_NLB_TG_with_ALB/dns/rdtypes0% | 0% | 0% | 7% | 92%
functions/source/populate_NLB_TG_with_ALB0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _getaddrinfo()
in functions/source/populate_NLB_TG_with_ALB/dns/resolver.py
93 40 6
def query()
in functions/source/populate_NLB_TG_with_ALB/dns/resolver.py
129 39 8
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 xfr()
in functions/source/populate_NLB_TG_with_ALB/dns/query.py
103 29 16
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 __init__()
in functions/source/populate_NLB_TG_with_ALB/dns/resolver.py
53 22 6
def from_unicode()
in functions/source/populate_NLB_TG_with_ALB/dns/name.py
55 22 3
def from_text()
in functions/source/populate_NLB_TG_with_ALB/dns/name.py
56 22 3
def read()
in functions/source/populate_NLB_TG_with_ALB/dns/zone.py
72 20 1
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/zone.py
62 17 1
def __eq__()
in functions/source/populate_NLB_TG_with_ALB/dns/message.py
26 16 2
def _validate_rrsig()
in functions/source/populate_NLB_TG_with_ALB/dns/dnssec.py
105 15 5
def _destination_and_source()
in functions/source/populate_NLB_TG_with_ALB/dns/query.py
19 15 5
def _header_line()
in functions/source/populate_NLB_TG_with_ALB/dns/message.py
43 15 2
def _rr_line()
in functions/source/populate_NLB_TG_with_ALB/dns/message.py
44 13 2
def to_wire()
in functions/source/populate_NLB_TG_with_ALB/dns/name.py
37 13 4
def from_text()
in functions/source/populate_NLB_TG_with_ALB/dns/ttl.py
32 13 1