aws-samples / sagemaker-studio-image-build-cli
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 19 units with 295 lines of code in units (66.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 4 medium size units (128 lines of code)
    • 3 small units (44 lines of code)
    • 11 very small units (71 lines of code)
0% | 17% | 43% | 14% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 17% | 43% | 14% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sagemaker_studio_image_build0% | 17% | 43% | 14% | 24%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
def main()
in sagemaker_studio_image_build/cli.py
52 2 0
def upload_zip_file()
in sagemaker_studio_image_build/builder.py
35 6 4
def log_stream()
in sagemaker_studio_image_build/logs.py
32 6 4
def __init__()
in sagemaker_studio_image_build/codebuild.py
32 8 6
def __enter__()
in sagemaker_studio_image_build/codebuild.py
29 2 1
def validate_args()
in sagemaker_studio_image_build/cli.py
20 8 2
def get_role()
in sagemaker_studio_image_build/cli.py
13 5 1
def _wait_for_build()
in sagemaker_studio_image_build/codebuild.py
11 2 3
def construct_vpc_config()
in sagemaker_studio_image_build/cli.py
10 2 1
def build()
in sagemaker_studio_image_build/codebuild.py
10 3 2
def _get_image_uri()
in sagemaker_studio_image_build/codebuild.py
10 2 1
def build_image()
in sagemaker_studio_image_build/builder.py
9 1 7
def _create_repo_if_required()
in sagemaker_studio_image_build/codebuild.py
7 2 1
def _get_studio_metadata()
in sagemaker_studio_image_build/codebuild.py
7 2 1
def build_image()
in sagemaker_studio_image_build/cli.py
6 1 2
def _start_build()
in sagemaker_studio_image_build/codebuild.py
5 1 1
def delete_zip_file()
in sagemaker_studio_image_build/builder.py
3 1 2
def logs_for_build()
in sagemaker_studio_image_build/logs.py
2 1 0
def __exit__()
in sagemaker_studio_image_build/codebuild.py
2 1 2