aws-samples / codepipeline-lambda-docker-images
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 208 units with 1,808 lines of code in units (32.6% of code).
    • 1 very long units (125 lines of code)
    • 2 long units (109 lines of code)
    • 20 medium size units (573 lines of code)
    • 27 small units (394 lines of code)
    • 158 very small units (607 lines of code)
6% | 6% | 31% | 21% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py6% | 6% | 31% | 21% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
CommonLayerCode/datalake-library/python8% | 3% | 23% | 22% | 41%
ApplicationCode/dockerfiles/routing-lambda0% | 66% | 0% | 14% | 18%
ApplicationCode/dockerfiles/stage-b-routing0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-a-postupdate-metadata0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-b-postupdate-metadata0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-b-redrive0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-a-preupdate-metadata0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-b-process-data0% | 0% | 78% | 0% | 21%
ApplicationCode/dockerfiles/stage-a-process-object0% | 0% | 77% | 0% | 22%
ApplicationCode/dockerfiles/stage-b-crawl-data0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-b-check-job0% | 0% | 100% | 0% | 0%
ApplicationCode/dockerfiles/stage-a-redrive0% | 0% | 0% | 100% | 0%
ApplicationCode/dockerfiles/redrive-lambda0% | 0% | 0% | 100% | 0%
ApplicationCode/dockerfiles/stage-a-routing0% | 0% | 0% | 100% | 0%
ApplicationCode/dockerfiles/stage-a-error0% | 0% | 0% | 100% | 0%
ApplicationCode/dockerfiles/stage-b-error0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def update_pipeline_execution()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/peh.py
125 10 4
def _create_single_metric()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/metric.py
55 4 3
def lambda_handler()
in ApplicationCode/dockerfiles/routing-lambda/src/lambda_function.py
54 5 2
def lambda_handler()
in ApplicationCode/dockerfiles/stage-b-routing/src/lambda_function.py
41 5 2
def _process_sns_notifications()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/metric.py
39 11 4
def _fetch_from_event()
in CommonLayerCode/datalake-library/python/datalake_library/configuration/event_configs.py
38 5 1
def __init__()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/config.py
38 9 3
def start_pipeline_execution()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/peh.py
36 6 4
def lambda_handler()
in ApplicationCode/dockerfiles/stage-a-postupdate-metadata/src/lambda_function.py
35 3 2
def lambda_handler()
in ApplicationCode/dockerfiles/stage-b-postupdate-metadata/src/lambda_function.py
32 3 2
def create_event()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/event.py
29 5 5
def copy_object()
in CommonLayerCode/datalake-library/python/datalake_library/interfaces/s3_interface.py
28 6 6
def query_object_metadata_index()
in CommonLayerCode/datalake-library/python/datalake_library/interfaces/dynamo_interface.py
27 6 7
def build()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/client.py
26 5 1
def __init__()
in CommonLayerCode/datalake-library/python/datalake_library/octagon/metadata.py
25 4 2
def transform_object()
in CommonLayerCode/datalake-library/python/datalake_library/transforms/stage_b_transforms/heavy_transform_blueprint.py
25 8 5
def lambda_handler()
in ApplicationCode/dockerfiles/stage-b-redrive/src/lambda_function.py
24 5 2
def lambda_handler()
in ApplicationCode/dockerfiles/stage-a-preupdate-metadata/src/lambda_function.py
23 2 2
def lambda_handler()
in ApplicationCode/dockerfiles/stage-b-process-data/src/lambda_function.py
22 3 2
def delete_objects()
in CommonLayerCode/datalake-library/python/datalake_library/interfaces/s3_interface.py
22 5 3