aws-samples / aws-vpc-cidr-mgmt
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 1,260 units with 18,439 lines of code in units (64.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (184 lines of code)
    • 49 medium complex units (1,831 lines of code)
    • 140 simple units (2,646 lines of code)
    • 1,068 very simple units (13,778 lines of code)
0% | <1% | 9% | 14% | 74%
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% | <1% | 9% | 14% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda/requests0% | 4% | 22% | 23% | 48%
lambda/urllib3/util0% | 7% | 4% | 33% | 53%
lambda/netaddr/ip0% | 2% | 24% | 27% | 45%
lambda/idna0% | 0% | 1% | 1% | 96%
lambda/urllib30% | 0% | 10% | 22% | 67%
lambda/chardet0% | 0% | 14% | 24% | 61%
lambda0% | 0% | 51% | 0% | 48%
lambda/urllib3/contrib0% | 0% | 10% | 35% | 53%
lambda/urllib3/packages0% | 0% | 26% | 12% | 60%
lambda/netaddr0% | 0% | 21% | 14% | 64%
lambda/requests_aws4auth0% | 0% | 12% | 35% | 52%
lambda/netaddr/strategy0% | 0% | 6% | 26% | 67%
lambda/netaddr/eui0% | 0% | 5% | 26% | 68%
lambda/chardet/cli0% | 0% | 0% | 45% | 54%
lambda/netaddr/contrib0% | 0% | 0% | 0% | 100%
lambda/certifi0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _compact_single_network()
in lambda/netaddr/ip/sets.py
39 28 2
def parse_url()
in lambda/urllib3/util/url.py
53 26 1
def send()
in lambda/requests/adapters.py
92 26 7
def valid_contexto()
in lambda/idna/core.py
32 23 3
def build_digest_header()
in lambda/requests/auth.py
80 23 3
def print_()
in lambda/urllib3/packages/six.py
52 22 2
def feed()
in lambda/chardet/universaldetector.py
66 22 2
def check_bidi()
in lambda/idna/core.py
44 21 2
def resolve_redirects()
in lambda/requests/sessions.py
66 21 10
def cidr_abbrev_to_verbose()
in lambda/netaddr/ip/__init__.py
45 20 1
def match_hostname()
in lambda/urllib3/packages/ssl_match_hostname/_implementation.py
47 20 2
def prepare_url()
in lambda/requests/models.py
55 20 3
def __init__()
in lambda/netaddr/ip/__init__.py
55 19 4
def uts46_remap()
in lambda/idna/core.py
25 18 3
def valid_glob()
in lambda/netaddr/ip/glob.py
38 18 1
def parse_ip_network()
in lambda/netaddr/ip/__init__.py
51 17 4
def connect()
in lambda/urllib3/connection.py
73 17 1
def _read_callback()
in lambda/urllib3/contrib/securetransport.py
41 16 3
def guess_json_utf()
in lambda/requests/utils.py
22 16 1
def iprange_to_globs()
in lambda/netaddr/ip/glob.py
40 15 2