aws-samples / aws-iot-sap-condition-monitoring-demo
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 29 units with 1,482 lines of code in units (85.6% 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 (67 lines of code)
    • 28 very simple units (1,415 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
cdk-iot-analytics0% | 0% | 0% | 100% | 0%
cdk-iot-analytics/cdk_sap_blog/analytics0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/cdk_sap_blog/iot0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/cdk_sap_blog/sap0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/cdk_sap_blog/sap/lambda_assets/function_code0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/cdk_sap_blog0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/cdk_sap_blog/analytics/lambda_assets/get_product_range0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/lambda_assets0% | 0% | 0% | 0% | 100%
cdk-iot-analytics/cdk_sap_blog/iot/lambda_assets0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run()
in cdk-iot-analytics/simulator.py
67 6 3
def __init__()
in cdk-iot-analytics/cdk_sap_blog/iot/iot_stack.py
247 5 4
def _get_secret()
in cdk-iot-analytics/cdk_sap_blog/sap/lambda_assets/function_code/lambda_function.py
28 5 0
def lambda_handler()
in cdk-iot-analytics/cdk_sap_blog/sap/lambda_assets/function_code/lambda_function.py
54 5 2
def handler()
in cdk-iot-analytics/cdk_sap_blog/analytics/lambda_assets/get_product_range/get_product_range.py
21 3 2
def _get_base_url()
in cdk-iot-analytics/cdk_sap_blog/sap/lambda_assets/function_code/lambda_function.py
8 3 0
def get_detector_model()
in cdk-iot-analytics/cdk_sap_blog/analytics/analytics.py
279 2 3
def __init__()
in cdk-iot-analytics/cdk_sap_blog/analytics/analytics_stack.py
41 2 4
def get_sap_response_email_sns_topic()
in cdk-iot-analytics/cdk_sap_blog/sap/sns.py
13 2 2
def generatekey()
in cdk-iot-analytics/cdk_sap_blog/create_key_and_csr.py
15 2 2
def generatecsr()
in cdk-iot-analytics/cdk_sap_blog/create_key_and_csr.py
19 2 2
def generate_key_and_csr()
in cdk-iot-analytics/cdk_sap_blog/create_key_and_csr.py
9 2 2
def handler()
in cdk-iot-analytics/lambda_assets/cw_logger.py
8 1 2
def handler()
in cdk-iot-analytics/cdk_sap_blog/iot/lambda_assets/cw_logger.py
8 1 2
def get_all_mqtt_rule()
in cdk-iot-analytics/cdk_sap_blog/iot/rules.py
24 1 4
def get_logger()
in cdk-iot-analytics/cdk_sap_blog/iot/lambda_.py
46 1 2
def __init__()
in cdk-iot-analytics/cdk_sap_blog/iot/iot_stack.py
5 1 0
def get_analytics_channel()
in cdk-iot-analytics/cdk_sap_blog/analytics/analytics.py
6 1 1
def get_analytics_datastore()
in cdk-iot-analytics/cdk_sap_blog/analytics/analytics.py
12 1 1
def get_analytics_pipeline()
in cdk-iot-analytics/cdk_sap_blog/analytics/analytics.py
97 1 3