aws-samples / sagemaker-custom-project-templates
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 2,869 units with 38,374 lines of code in units (55.1% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (877 lines of code)
    • 78 medium complex units (2,834 lines of code)
    • 249 simple units (4,704 lines of code)
    • 2,535 very simple units (29,959 lines of code)
0% | 2% | 7% | 12% | 78%
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% | 2% | 7% | 12% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
mlops-template-gitlab/lambda_functions0% | 2% | 7% | 11% | 78%
batch-inference/seedcode0% | 0% | 0% | 30% | 69%
asynchronous-inference-endpoint/seedcode0% | 0% | 0% | 62% | 37%
mlops-template-gitlab/seedcode0% | 0% | 0% | 18% | 81%
multi-model-endpoint/seedcode0% | 0% | 0% | 61% | 38%
multi-branch-mlops-train/cloud_formation0% | 0% | 0% | 0% | 100%
multi-branch-mlops-train/pipelines0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def cli_detect()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/charset_normalizer/cli/normalizer.py
217 36 1
def cli_detect()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/charset_normalizer/cli/normalizer.py
217 36 1
def parse_url()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/urllib3/util/url.py
55 27 1
def parse_url()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/urllib3/util/url.py
55 27 1
def send()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/requests/adapters.py
92 26 7
def send()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/requests/adapters.py
92 26 7
def lambda_handler()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/lambda_function.py
149 26 2
def valid_contexto()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/core.py
33 23 3
def feed()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/charset_normalizer/md.py
42 23 2
def build_digest_header()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/requests/auth.py
80 23 3
def valid_contexto()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/idna/core.py
33 23 3
def feed()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/charset_normalizer/md.py
42 23 2
def build_digest_header()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/requests/auth.py
80 23 3
def print_()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/urllib3/packages/six.py
52 22 2
def print_()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/urllib3/packages/six.py
52 22 2
def check_bidi()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/core.py
44 21 2
def resolve_redirects()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/requests/sessions.py
66 21 10
def check_bidi()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/idna/core.py
44 21 2
def resolve_redirects()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/requests/sessions.py
66 21 10
def match_hostname()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/urllib3/packages/ssl_match_hostname/_implementation.py
47 20 2