aws / sagemaker-example-notebooks-testing
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 150 units with 1,844 lines of code in units (53.5% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (223 lines of code)
    • 24 medium size units (680 lines of code)
    • 26 small units (394 lines of code)
    • 97 very small units (547 lines of code)
0% | 12% | 36% | 21% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 30% | 21% | 32%
ts0% | 0% | 55% | 22% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/images/codebuild-image/python/src/notebooks/cli0% | 40% | 31% | 12% | 15%
lib/images/processing-image0% | 86% | 0% | 0% | 13%
lib0% | 0% | 55% | 22% | 22%
lib/images/codebuild-image/python/src/notebooks0% | 0% | 26% | 26% | 47%
lambda/python-functions0% | 0% | 52% | 30% | 16%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/describe_notebook_jobs.py
81 11 0
def run_notebook()
in cdk-project/lib/images/processing-image/execute.py
76 13 0
def main()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/run_pr_notebooks.py
66 11 0
def kernel_type_for()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/kernels.py
45 13 1
constructor()
in cdk-project/lib/common.ts
45 16 1
def describe_run()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/run.py
43 8 2
constructor()
in cdk-project/lib/image-stack.ts
41 1 3
37 2 0
def main()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/run_all_notebooks.py
36 4 0
def stop_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
31 10 3
def parse_args()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/run_pr_notebooks.py
30 2 1
def check_grammar()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/lint.py
29 14 1
def parse_args()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/run_all_notebooks.py
27 1 1
export function enableSageMakerOperation()
in cdk-project/lib/common.ts
27 2 1
def delete_experiment()
in cdk-project/lambda/python-functions/clean_endpoints.py
25 6 2
def batch_delete_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
25 10 3
def _create_s3_bucket_if_it_does_not_exist()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/utils.py
24 7 3
export function createPullRequestBuildSpec()
in cdk-project/lib/buildspecs.ts
23 1 0
def get_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
23 7 4
export function createFullRepoScanBuildSpec()
in cdk-project/lib/buildspecs.ts
22 1 0