aws-samples / sagemaker-custom-project-templates
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 2,869 units with 38,374 lines of code in units (55.1% of code).
    • 161 very long units (16,857 lines of code)
    • 24 long units (1,533 lines of code)
    • 177 medium size units (5,204 lines of code)
    • 341 small units (4,973 lines of code)
    • 2,166 very small units (9,807 lines of code)
43% | 3% | 13% | 12% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py43% | 3% | 13% | 12% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
mlops-template-gitlab/lambda_functions44% | 3% | 12% | 12% | 25%
mlops-template-gitlab/seedcode0% | 22% | 41% | 16% | 19%
multi-branch-mlops-train/cloud_formation0% | 47% | 34% | 0% | 18%
batch-inference/seedcode0% | 0% | 51% | 21% | 26%
asynchronous-inference-endpoint/seedcode0% | 0% | 62% | 18% | 18%
multi-branch-mlops-train/pipelines0% | 0% | 68% | 0% | 31%
multi-model-endpoint/seedcode0% | 0% | 38% | 42% | 19%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def cli_detect()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/charset_normalizer/cli/normalizer.py
217 36 1
def cli_detect()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/charset_normalizer/cli/normalizer.py
217 36 1
def lambda_handler()
in mlops-template-gitlab/lambda_functions/lambda-seedcode-checkin-gitlab/lambda_function.py
149 26 2
def _seg_0()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_1()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_2()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_3()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_4()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_5()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_6()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_7()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_8()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_9()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_10()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_11()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_12()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_13()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_14()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_15()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0
def _seg_16()
in mlops-template-gitlab/lambda_functions/lambda-gitlab-pipeline-trigger/idna/uts46data.py
103 1 0