aws-samples / lookout-for-equipment-demo
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 43 units with 578 lines of code in units (53.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 6 medium size units (198 lines of code)
    • 13 small units (175 lines of code)
    • 23 very small units (154 lines of code)
0% | 8% | 34% | 30% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 8% | 34% | 30% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
getting_started/utils0% | 9% | 36% | 29% | 24%
blogs/wind-turbine-engie0% | 0% | 0% | 37% | 62%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def plot_histograms()
in getting_started/utils/lookout_equipment_utils.py
51 7 3
def plot_signals()
in getting_started/utils/lookout_equipment_utils.py
45 5 3
def set_parameters()
in getting_started/utils/lookout_equipment_utils.py
41 7 11
def delete()
in getting_started/utils/lookout_equipment_utils.py
35 1 2
def list_inference_executions()
in getting_started/utils/lookout_equipment_utils.py
27 6 5
def create()
in getting_started/utils/lookout_equipment_utils.py
26 6 1
def __init__()
in getting_started/utils/lookout_equipment_utils.py
24 2 4
def _create_component_schema()
in getting_started/utils/lookout_equipment_utils.py
19 3 2
def _load_model_response()
in getting_started/utils/lookout_equipment_utils.py
17 2 1
def poll_model_training()
in getting_started/utils/lookout_equipment_utils.py
16 2 2
def _get_time_ranges()
in getting_started/utils/lookout_equipment_utils.py
14 8 1
def get_predictions()
in getting_started/utils/lookout_equipment_utils.py
14 4 1
def ingest_data()
in getting_started/utils/lookout_equipment_utils.py
13 1 3
def clean_up_data()
in blogs/wind-turbine-engie/utils.py
13 1 1
def get_client()
in getting_started/utils/lookout_equipment_utils.py
12 1 1
def plot_timeseries()
in getting_started/utils/lookout_equipment_utils.py
12 1 0
def delete()
in getting_started/utils/lookout_equipment_utils.py
12 4 1
def _create_data_schema_map()
in getting_started/utils/lookout_equipment_utils.py
11 3 1
def _poll_event()
in getting_started/utils/lookout_equipment_utils.py
11 2 4
def set_time_periods()
in getting_started/utils/lookout_equipment_utils.py
11 1 5