awslabs / aws-serverless-data-lake-framework
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 500 units with 8,542 lines of code in units (24.6% of code).
    • 10 very long units (1,355 lines of code)
    • 27 long units (1,800 lines of code)
    • 91 medium size units (2,933 lines of code)
    • 80 small units (1,162 lines of code)
    • 292 very small units (1,292 lines of code)
15% | 21% | 34% | 13% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py15% | 21% | 34% | 13% | 15%
scala37% | 0% | 33% | 26% | 2%
js0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sdlf-utils20% | 26% | 34% | 8% | 10%
sdlf-datalakeLibrary7% | 10% | 25% | 18% | 37%
sdlf-foundations11% | 5% | 40% | 31% | 10%
sdlf-stageB0% | 41% | 50% | 5% | 2%
sdlf-stageA0% | 30% | 39% | 26% | 3%
sdlf-pipLibrary0% | 0% | 87% | 0% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-stageB/lambda/stage-b-postupdate-metadata/src/lambda_function.py
177 27 2
def transform_object()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas_sqoop.py
176 21 5
def transform_object()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas.py
157 18 5
def lambda_handler()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-stageA/lambda/stage-a-postupdate-metadata/src/lambda_function.py
146 16 2
def lambda_handler()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-pipeline/nested-stacks/lambda/craete-dependencies-by-table/src/lambda_function.py
129 29 2
def update_pipeline_execution()
in sdlf-datalakeLibrary/python/datalake_library/octagon/peh.py
123 10 4
def main()
in sdlf-foundations/scripts/deequ/resources/deequ-suggestion-analysis-verification-runner.scala
113 6 1
def check_job_status()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas_sqoop.py
113 20 5
def check_job_status()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_a_transforms/light_transform_athena_ctas.py
113 20 5
def lambda_handler()
in sdlf-utils/pipeline-examples/manifests/stageB/lambda/stage-b-processmanifest/src/lambda_function.py
108 21 2
def check_job_status()
in sdlf-utils/pipeline-examples/event-dataset-dependencies/sdlf-engineering-datalakeLibrary/python/datalake_library/transforms/stage_b_transforms/heavy_transform_athena.py
100 23 5
def lambda_handler()
in sdlf-utils/ingestion-examples/sqoop/sdlf-stageX/lambda/stage-x-create-emr-cluster/src/lambda_function.py
93 2 2
def lambda_handler()
in sdlf-utils/pipeline-examples/topic-modelling/stageB/lambda/stage-b-compile-data/src/lambda_function.py
92 26 2
def lambda_handler()
in sdlf-utils/pipeline-examples/manifests/stageA/lambda/stage-a-loaddatafile-metadata/src/lambda_function.py
85 13 2
def __init__()
in sdlf-utils/pipeline-examples/glue-jobs-deployer/pipeline_scripts/examplepipeline-glue-job.py
80 1 61
def writeTableToTargetBucket()
in sdlf-utils/pipeline-examples/glue-jobs-deployer/pipeline_scripts/examplepipeline-glue-job.py
76 15 0
def lambda_handler()
in sdlf-utils/pipeline-examples/datalake-workload-management/sdlf-wlm-integration/sdlf-stageB/lambda/stage-b-routing/src/lambda_function.py
72 13 2
def lambda_handler()
in sdlf-utils/pipeline-examples/manifests/stageB/lambda/stage-b-postupdate-metadata/src/lambda_function.py
70 7 2
def fillProperties()
in sdlf-utils/pipeline-examples/glue-jobs-deployer/pipeline_scripts/examplepipeline-glue-job.py
70 24 2
def lambda_handler()
in sdlf-utils/pipeline-examples/manifests/stageA/lambda/stage-a-postupdate-metadata/src/lambda_function.py
65 8 2