awslabs / aws-iot-greengrass-accelerators
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 3,649 units with 63,303 lines of code in units (62.1% of code).
    • 315 very long units (32,763 lines of code)
    • 48 long units (3,209 lines of code)
    • 287 medium size units (8,761 lines of code)
    • 526 small units (7,718 lines of code)
    • 2,473 very small units (10,852 lines of code)
51% | 5% | 13% | 12% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py51% | 4% | 13% | 12% | 17%
ts51% | 24% | 16% | 2% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
v1/stream_manager/cdk/cr-create-iot-thing-cert-policy53% | 5% | 12% | 12% | 16%
v1/stream_manager/cdk/cr-greengrass-service-role53% | 3% | 13% | 12% | 16%
v1/stream_manager/cdk/cr-greengrass-manage-deployments53% | 3% | 12% | 12% | 17%
v1/stream_manager/cdk/cr-s3-delete-objects53% | 3% | 12% | 12% | 16%
v1/stream_manager/cdk94% | 0% | 0% | 5% | 0%
v2/base/cdk/lib22% | 24% | 34% | 5% | 12%
v2/etl_simple/cdk/lib49% | 0% | 39% | 0% | 10%
v1/extract_transform_load/cfn/lambda_functions0% | 38% | 39% | 10% | 12%
v2/os_cmd/cdk/lib0% | 43% | 44% | 0% | 12%
v2/etl_simple/cdk/components0% | 37% | 16% | 5% | 40%
v2/os_cmd/cdk/components0% | 18% | 0% | 7% | 73%
v1/machine_learning_inference/cfn/lambda_functions0% | 17% | 47% | 17% | 17%
v1/stream_manager/cdk/iot-analytics0% | 100% | 0% | 0% | 0%
v1/stream_manager/cdk/lambda-gg-stream-aggregator0% | 0% | 70% | 13% | 16%
v2/base/docker0% | 0% | 27% | 41% | 30%
v1/stream_manager/cdk/lambda-gg-sensor-source0% | 0% | 0% | 32% | 67%
v1/stream_manager/docker_compose_stack/app0% | 0% | 0% | 88% | 11%
v1/stream_manager/cdk/lambda-gg-stream-producer0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in v1/stream_manager/cdk/index.ts
322 1 3
constructor()
in v2/base/cdk/lib/BaseImplementationStack.ts
186 2 3
constructor()
in v2/etl_simple/cdk/lib/EtlSimpleStack.ts
119 3 3
def _seg_0()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_1()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_2()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_3()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_4()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_5()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_6()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_7()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_8()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_9()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_10()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_11()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_12()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_13()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_14()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_15()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0
def _seg_16()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/uts46data.py
103 1 0