awslabs / aws-orbit-workbench
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 855 units with 10,478 lines of code in units (17.4% of code).
    • 3 very long units (358 lines of code)
    • 17 long units (1,166 lines of code)
    • 114 medium size units (3,368 lines of code)
    • 194 small units (2,841 lines of code)
    • 527 very small units (2,745 lines of code)
3% | 11% | 32% | 27% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 11% | 32% | 26% | 26%
tsx0% | 0% | 20% | 43% | 35%
ts0% | 0% | 79% | 0% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cli/aws_orbit3% | 12% | 33% | 24% | 25%
images/orbit-controller10% | 0% | 20% | 34% | 35%
sdk/aws_orbit_sdk0% | 8% | 33% | 33% | 24%
jupyterlab_orbit/jupyterlab_orbit0% | 18% | 49% | 22% | 8%
images/jupyter-user0% | 23% | 28% | 42% | 5%
plugins/redshift0% | 60% | 0% | 0% | 39%
images/utility-data0% | 100% | 0% | 0% | 0%
scripts0% | 0% | 70% | 29% | 0%
jupyterlab_orbit/src0% | 0% | 31% | 35% | 33%
plugins/emr_on_eks0% | 0% | 45% | 29% | 25%
trial0% | 0% | 0% | 49% | 50%
plugins/custom_cfn0% | 0% | 0% | 20% | 80%
plugins/team_script_launcher0% | 0% | 0% | 39% | 60%
plugins/code_commit0% | 0% | 0% | 0% | 100%
plugins/hello_world0% | 0% | 0% | 0% | 100%
plugins/lustre0% | 0% | 0% | 0% | 100%
plugins/sm-operator0% | 0% | 0% | 0% | 100%
plugins/ray0% | 0% | 0% | 0% | 100%
plugins/voila0% | 0% | 0% | 0% | 100%
plugins/overprovisioning0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def deploy_env()
in cli/aws_orbit/remote_files/eksctl.py
146 27 2
def replication_worker()
in images/orbit-controller/src/orbit_controller/operators/imagereplication_operator.py
111 11 4
def _create_identity_pool()
in cli/aws_orbit/remote_files/cdk/env.py
101 2 1
def _dump_pod()
in jupyterlab_orbit/jupyterlab_orbit/handlers/containers.py
92 22 1
def deploy_teams()
in cli/aws_orbit/remote_files/deploy.py
92 16 2
def _create_vpc_endpoints()
in cli/aws_orbit/remote_files/cdk/foundation.py
92 4 1
def data_profile()
in sdk/aws_orbit_sdk/transformations.py
84 21 2
def generate_manifest()
in cli/aws_orbit/remote_files/eksctl.py
83 15 3
def deploy_env()
in cli/aws_orbit/remote_files/kubectl.py
79 4 1
def fetch_toolkit_data()
in cli/aws_orbit/models/context.py
70 21 1
def prepareNotebook()
in images/jupyter-user/python-utils/notebook_runner.py
65 14 3
def _create_post_authentication_lambda()
in cli/aws_orbit/remote_files/cdk/env.py
65 2 1
def lambda_handler()
in plugins/redshift/redshift/lambda_sources/redshift_db_creator/redshift_functions.py
60 10 4
def spark_submit()
in sdk/aws_orbit_sdk/emr.py
59 11 2
def _create_role_cluster()
in cli/aws_orbit/remote_files/cdk/env.py
57 1 1
def deploy_images_remotely()
in cli/aws_orbit/remote_files/deploy.py
56 8 2
def gen_kubeflow_config()
in cli/aws_orbit/remote_files/kubeflow.py
55 3 3
def main()
in images/utility-data/src/utility-data/stage_regression_data.py
53 3 0
def handler()
in cli/aws_orbit/remote_files/cdk/lambda_sources/cognito_post_authentication/index.py
53 14 4
def _load_context_from_manifest()
in cli/aws_orbit/models/context.py
51 2 1