aws-samples / aws-iot-device-provisioning-with-certificate-manager
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 40 units with 509 lines of code in units (46.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (25 lines of code)
    • 6 simple units (175 lines of code)
    • 33 very simple units (309 lines of code)
0% | 0% | 4% | 34% | 60%
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% | 0% | 4% | 34% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
provisioning_lambda0% | 0% | 16% | 52% | 30%
deployment_lambda0% | 0% | 0% | 46% | 53%
example0% | 0% | 0% | 45% | 54%
provisioning_lambda/clients0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_config()
in provisioning_lambda/lambda_function.py
25 12 0
def main()
in example/provisioning_app.py
31 9 0
def cf_handler()
in deployment_lambda/lambda_function.py
38 8 2
def provisioning_handler()
in provisioning_lambda/lambda_function.py
61 7 2
def get_request_body()
in provisioning_lambda/lambda_function.py
20 6 1
def delete_ca()
in deployment_lambda/lambda_function.py
10 6 1
def parse_apig_paginator()
in example/provisioning_app.py
15 6 2
def send_response()
in deployment_lambda/lambda_function.py
12 5 4
def check_env()
in provisioning_lambda/lambda_function.py
10 4 0
def disable_legacy_certificate()
in provisioning_lambda/clients/iot.py
16 4 2
def record_device_info()
in provisioning_lambda/lambda_function.py
13 3 3
def issue_cert()
in provisioning_lambda/clients/acmpca.py
16 3 4
def delete_thing()
in provisioning_lambda/clients/iot.py
10 3 2
def delete_policy_versions()
in provisioning_lambda/clients/iot.py
5 3 2
def main()
in example/device.py
22 3 0
def get_certificate()
in provisioning_lambda/clients/acmpca.py
7 2 3
def check_response()
in provisioning_lambda/clients/iot.py
11 2 1
def create_thing()
in provisioning_lambda/clients/iot.py
9 2 2
def register_certificate()
in provisioning_lambda/clients/iot.py
9 2 3
def get_certificate()
in deployment_lambda/lambda_function.py
9 2 2