awslabs / disaster-recovery-for-aws-iot
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 126 units with 2,569 lines of code in units (73.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (374 lines of code)
    • 13 simple units (499 lines of code)
    • 108 very simple units (1,696 lines of code)
0% | 0% | 14% | 19% | 66%
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% | 14% | 19% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/lambda/iot-dr-layer0% | 0% | 22% | 16% | 60%
source/lambda/iot-dr-r53-health-check0% | 0% | 82% | 0% | 17%
source/lambda/sfn-iot-mr-thing-crud0% | 0% | 85% | 0% | 14%
source/lambda/sfn-iot-mr-thing-group-crud0% | 0% | 40% | 0% | 59%
source/lambda/sfn-iot-mr-thing-type-crud0% | 0% | 35% | 0% | 64%
source/tools0% | 0% | 0% | 22% | 77%
source/lambda/iot-dr-launch-solution0% | 0% | 0% | 62% | 37%
source/lambda/iot-dr-region-syncer0% | 0% | 0% | 27% | 72%
source/lambda/iot-dr-custom-launch-solution0% | 0% | 0% | 60% | 39%
source/lambda/iot-dr-missing-device-replication0% | 0% | 0% | 45% | 54%
source/lambda/iot-dr-create-r53-checker0% | 0% | 0% | 0% | 100%
source/lambda/iot-mr-jitr0% | 0% | 0% | 0% | 100%
source/lambda/sfn-iot-mr-shadow-syncer0% | 0% | 0% | 0% | 100%
source/lambda/sfn-iot-mr-dynamo-trigger0% | 0% | 0% | 0% | 100%
source/lambda/iot-mr-cross-region0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in source/lambda/sfn-iot-mr-thing-crud/lambda_function.py
86 18 2
def lambda_handler()
in source/lambda/sfn-iot-mr-thing-group-crud/lambda_function.py
57 18 2
def lambda_handler()
in source/lambda/iot-dr-r53-health-check/iot-dr-r53-health-checker.py
94 17 2
def lambda_handler()
in source/lambda/sfn-iot-mr-thing-type-crud/lambda_function.py
35 13 2
def create_thing_with_cert_and_policy()
in source/lambda/iot-dr-layer/device_replication.py
102 13 7
def compare_shadow()
in source/tools/iot-dr-shadow-cmp.py
43 10 4
def create_thing()
in source/lambda/iot-dr-layer/device_replication.py
42 10 5
def compare_device()
in source/tools/iot-devices-cmp.py
29 9 1
def lambda_handler()
in source/lambda/iot-dr-launch-solution/lambda_function.py
118 9 2
def sync_thing()
in source/lambda/iot-dr-region-syncer/iot-region-to-region-syncer.py
31 8 3
def verify_events_indexing_enabled()
in source/lambda/iot-dr-launch-solution/lambda_function.py
26 7 1
def create_registry_event()
in source/lambda/iot-dr-region-syncer/iot-region-to-ddb-syncer.py
34 7 4
def lambda_handler()
in source/lambda/iot-dr-custom-launch-solution/lambda_function.py
46 7 2
def dr_endpoint_verifier()
in source/tools/iot-dr-pubsub.py
26 6 2
def dr_custom_endpoint_verifier()
in source/tools/iot-dr-pubsub.py
28 6 2
def checkThingCertPolicySync()
in source/tools/test-dr-deployment.py
23 6 2
def find_orphaned_things()
in source/lambda/iot-dr-missing-device-replication/lambda_function.py
21 6 3
def delete_policy()
in source/lambda/iot-dr-layer/device_replication.py
32 6 2
def search_things()
in source/tools/iot-search-devices.py
32 5 1
def get_device_status()
in source/tools/iot-devices-cmp.py
23 5 2