aws-samples / aws-iot-device-provisioning-via-sideload-reg-codes-with-s3-upload
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 45 units with 679 lines of code in units (75.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 3 simple units (89 lines of code)
    • 42 very simple units (590 lines of code)
0% | 0% | 0% | 13% | 86%
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% | 0% | 13% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
api/runtime0% | 0% | 0% | 51% | 48%
client0% | 0% | 0% | 5% | 94%
api/infrastructure/stacks0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_certificate()
in api/runtime/app.py
27 9 0
35 6 1
def init_thing_with_reg_api()
in client/iot_client.py
27 6 1
def init_jobs_response()
in client/iot_client.py
12 5 4
def execute_job()
in client/iot_client.py
16 5 2
def demo_connectivity_issues()
in client/iot_client.py
17 5 1
def sort_querystrings()
in client/aws_auth.py
15 5 1
def post()
in client/aws_auth.py
15 5 4
def init_thing_in_iot()
in client/iot_client.py
18 4 3
def init_app_mqtt_client()
in client/iot_client.py
32 4 2
def job_detail_callback()
in client/iot_client.py
24 4 4
def heartbeater()
in client/iot_client.py
10 4 1
def _attach_chalice_permissions()
in api/infrastructure/stacks/chaliceapp.py
9 3 1
def shadow_callback()
in client/iot_client.py
14 3 4
7 3 2
def __init__()
in client/aws_auth.py
21 3 6
def get()
in client/aws_auth.py
14 3 3
def _create_credential_provider_role()
in api/infrastructure/stacks/chaliceapp.py
16 2 1
def receive_reg_code()
in client/iot_client.py
8 2 0
def report_shadow()
in client/iot_client.py
12 2 4