aws-quickstart / quickstart-urbanio-iot-aas
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 78 units with 644 lines of code in units (30.0% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (116 lines of code)
    • 5 medium size units (147 lines of code)
    • 7 small units (98 lines of code)
    • 64 very small units (283 lines of code)
0% | 18% | 22% | 15% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 18% | 22% | 15% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/asset-model-converter0% | 20% | 21% | 10% | 48%
functions/source/attributes-updater0% | 54% | 0% | 12% | 33%
functions/source/association-updater0% | 0% | 37% | 18% | 43%
functions/source/iot-core-to-sqs0% | 0% | 100% | 0% | 0%
functions/source/s3-to-lifecycle-events-converter0% | 0% | 0% | 31% | 68%
functions/source/lifecycle-events-mapping-updater0% | 0% | 0% | 64% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def process_event()
in functions/source/asset-model-converter/handler.py
63 17 2
def process_event()
in functions/source/attributes-updater/handler.py
53 14 2
def setup_model()
in functions/source/asset-model-converter/model_converter.py
42 15 2
def get_cache_ids()
in functions/source/association-updater/handler.py
30 10 2
def handler()
in functions/source/iot-core-to-sqs/handler.py
29 1 2
def setup_asset()
in functions/source/asset-model-converter/asset_converter.py
24 5 7
def associate_asset()
in functions/source/association-updater/association_converter.py
22 8 3
def create_asset()
in functions/source/asset-model-converter/sitewise.py
19 3 3
def handler()
in functions/source/asset-model-converter/handler.py
15 4 2
def handler()
in functions/source/s3-to-lifecycle-events-converter/handler.py
15 2 2
def handler()
in functions/source/association-updater/handler.py
14 3 2
def handler()
in functions/source/attributes-updater/handler.py
12 3 2
def process_event()
in functions/source/association-updater/handler.py
12 6 2
def handler()
in functions/source/lifecycle-events-mapping-updater/handler.py
11 2 2
def waitForActiveAssetModel()
in functions/source/asset-model-converter/sitewise.py
10 2 2
def update_asset_model()
in functions/source/asset-model-converter/sitewise.py
10 1 6
def item()
in functions/source/asset-model-converter/sitewise_assets_cache.py
10 1 7
def send_sqs_messages()
in functions/source/s3-to-lifecycle-events-converter/handler.py
10 3 4
def update_asset_properties()
in functions/source/asset-model-converter/sitewise.py
9 2 3
def create_asset_model()
in functions/source/asset-model-converter/sitewise.py
9 1 5