aws-samples / aws-iot-ota-deployment-tool
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 60 units with 1,015 lines of code in units (83.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (169 lines of code)
    • 5 simple units (166 lines of code)
    • 52 very simple units (680 lines of code)
0% | 0% | 16% | 16% | 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% | 16% | 16% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 23% | 9% | 66%
deploy0% | 0% | 23% | 44% | 32%
src/aws_interfaces0% | 0% | 0% | 9% | 90%
src/lambda_handlers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def monitor_start()
in src/monitor.py
52 18 1
def schedule_jobs()
in src/jobs_scheduler.py
66 16 2
def clean()
in deploy/deploy_agent.py
51 12 4
def stop()
in deploy/daemon.py
23 7 1
def init_config()
in src/jobs_configure.py
29 7 1
def build_and_run_client()
in deploy/deploy_agent.py
74 6 2
def is_submit_param_valid()
in src/add_job_schedule.py
19 6 3
def create_job()
in src/aws_interfaces/iot_interface.py
21 6 2
def daemonize()
in deploy/daemon.py
30 5 1
def start()
in deploy/daemon.py
13 5 1
def cancel_job()
in src/aws_interfaces/iot_interface.py
17 5 2
def abort_cfg_section_parser()
in src/jobs_configure.py
18 5 1
def delete_job()
in src/aws_interfaces/iot_interface.py
13 4 2
def delete_stream()
in src/aws_interfaces/iot_interface.py
13 4 2
def lambda_handler()
in src/lambda_handlers/metrics_generator.py
14 4 2
def lambda_handler()
in src/lambda_handlers/ota_force_stopper.py
13 4 2
16 4 1
def alarm_configs_parser()
in src/jobs_configure.py
23 4 1
def add_job_entry()
in src/add_job_schedule.py
7 3 0
def parse_thingList()
in src/monitor.py
16 3 1