aws-samples / aws-iot-sitewise-tools
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 17 units with 231 lines of code in units (47.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (104 lines of code)
    • 2 small units (24 lines of code)
    • 12 very small units (103 lines of code)
0% | 0% | 45% | 10% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 45% | 10% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sitewise_monitor_dashboard_replicator0% | 0% | 43% | 7% | 48%
sitewise_export_tools0% | 0% | 47% | 17% | 34%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
def get_source_dashboard()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
40 5 1
def case_handler_1st_pass()
in sitewise_export_tools/asset_model_exporter.py
33 20 2
def dashboard_sync()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
31 6 1
def source_asset_id_check()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
12 3 1
def get_models()
in sitewise_export_tools/asset_model_exporter.py
12 2 0
def update_definition()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
10 4 3
def case_handler_2nd_pass()
in sitewise_export_tools/asset_model_exporter.py
10 7 2
def list_portals()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_copy.py
9 4 0
def list_projects()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_copy.py
9 5 1
def list_dashboards()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_copy.py
9 4 1
def list_portals()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
9 4 0
def list_projects()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
9 5 1
def list_dashboards()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
9 4 1
def list_assets()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
8 3 1
def walk_dict()
in sitewise_monitor_dashboard_replicator/sitewise_dashboard_replicator.py
7 5 3
def walk_dict_filter()
in sitewise_export_tools/asset_model_exporter.py
7 6 3
def walk_dict()
in sitewise_export_tools/asset_model_exporter.py
7 5 3