aws-samples / automated-iot-fleet-provisioning-by-claim
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 42 units with 436 lines of code in units (41.7% 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)
    • 1 simple units (20 lines of code)
    • 41 very simple units (416 lines of code)
0% | 0% | 0% | 4% | 95%
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% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
SubTemplates/IoT/Lambdas/provision_device/client0% | 0% | 0% | 14% | 85%
SubTemplates/IoT/Lambdas/provision_device0% | 0% | 0% | 0% | 100%
SubTemplates/IoT/Lambdas/cert_rotation_monitor0% | 0% | 0% | 0% | 100%
SubTemplates/IoT/Lambdas/cert_rotation_hook0% | 0% | 0% | 0% | 100%
SubTemplates/IoT/Lambdas/bootstrap_generator0% | 0% | 0% | 0% | 100%
SubTemplates/IoT/Lambdas/provision_device/client/utils0% | 0% | 0% | 0% | 100%
SubTemplates/IoT/Lambdas/provision_hook0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def on_message_callback()
in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py
20 6 2
def deactivate_cert()
in SubTemplates/IoT/Lambdas/cert_rotation_monitor/app.py
15 5 1
def deactivate_cert()
in SubTemplates/IoT/Lambdas/cert_rotation_hook/app.py
14 5 1
def clearBootstrapPolicy()
in SubTemplates/IoT/Lambdas/provision_device/app.py
24 4 0
def handler()
in SubTemplates/IoT/Lambdas/provision_device/app.py
33 4 2
def __init__()
in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py
24 4 2
def run_provisioning()
in SubTemplates/IoT/Lambdas/provision_device/client/main.py
10 4 1
def handler()
in SubTemplates/IoT/Lambdas/cert_rotation_monitor/app.py
13 3 2
def createModelBootstraps()
in SubTemplates/IoT/Lambdas/bootstrap_generator/app.py
20 3 1
def createClient()
in SubTemplates/IoT/Lambdas/provision_device/app.py
16 3 2
def get_current_certs()
in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py
7 3 1
def send()
in SubTemplates/IoT/Lambdas/provision_device/cfnresponse.py
26 3 6
def handler()
in SubTemplates/IoT/Lambdas/cert_rotation_hook/app.py
12 2 2
def handler()
in SubTemplates/IoT/Lambdas/provision_hook/app.py
4 2 2
def updateConfig()
in SubTemplates/IoT/Lambdas/provision_device/app.py
8 2 3
def createModelBootstraps()
in SubTemplates/IoT/Lambdas/provision_device/app.py
16 2 0
def core_connect()
in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py
17 2 1
def get_official_certs()
in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py
5 2 3
def register_thing()
in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py
9 2 3
def get_overdue_things()
in SubTemplates/IoT/Lambdas/cert_rotation_monitor/app.py
5 1 1