aws-samples / aws-iot-ota-deployment-tool
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 60 units with 1,015 lines of code in units (83.8% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (243 lines of code)
    • 13 medium size units (367 lines of code)
    • 20 small units (292 lines of code)
    • 23 very small units (113 lines of code)
0% | 23% | 36% | 28% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 23% | 36% | 28% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
deploy0% | 57% | 24% | 5% | 12%
src0% | 23% | 39% | 26% | 9%
src/aws_interfaces0% | 0% | 52% | 33% | 13%
src/lambda_handlers0% | 0% | 0% | 91% | 8%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def build_and_run_client()
in deploy/deploy_agent.py
74 6 2
def schedule_jobs()
in src/jobs_scheduler.py
66 16 2
def monitor_start()
in src/monitor.py
52 18 1
def clean()
in deploy/deploy_agent.py
51 12 4
def fetch_job()
in src/fetch_job_schedule.py
45 3 0
def default_section_parser()
in src/jobs_configure.py
39 2 1
def submit_job_config()
in src/add_job_schedule.py
35 2 0
def daemonize()
in deploy/daemon.py
30 5 1
def init_config()
in src/jobs_configure.py
29 7 1
def create_alarms()
in src/aws_interfaces/alarm_interface.py
26 3 2
def delete_alarms()
in src/aws_interfaces/alarm_interface.py
26 3 2
def create_job_document()
in src/jobs_configure.py
25 2 1
def _create_alarm_base()
in src/aws_interfaces/alarm_interface.py
24 2 10
def stop()
in deploy/daemon.py
23 7 1
def alarm_configs_parser()
in src/jobs_configure.py
23 4 1
def create_job()
in src/aws_interfaces/iot_interface.py
21 6 2
def create_alarm()
in src/aws_interfaces/alarm_interface.py
21 3 12
def create_stream()
in src/aws_interfaces/iot_interface.py
20 2 6
def is_submit_param_valid()
in src/add_job_schedule.py
19 6 3
def abort_cfg_section_parser()
in src/jobs_configure.py
18 5 1