awslabs / aws-emr-launch
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 218 units with 2,148 lines of code in units (45.6% of code).
    • 1 very long units (138 lines of code)
    • 4 long units (275 lines of code)
    • 20 medium size units (595 lines of code)
    • 38 small units (551 lines of code)
    • 155 very small units (589 lines of code)
6% | 12% | 27% | 25% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py6% | 12% | 27% | 25% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws_emr_launch/control_plane/constructs86% | 0% | 0% | 0% | 13%
aws_emr_launch/lambda_sources/emr_utilities0% | 56% | 20% | 13% | 9%
aws_emr_launch/constructs/step_functions0% | 12% | 29% | 28% | 29%
aws_emr_launch/constructs/emr_constructs0% | 0% | 28% | 23% | 48%
aws_emr_launch/constructs/managed_configurations0% | 0% | 100% | 0% | 0%
aws_emr_launch/constructs/lambdas0% | 0% | 51% | 44% | 4%
aws_emr_launch/constructs/iam_roles0% | 0% | 18% | 60% | 21%
aws_emr_launch/control_plane/lambda_sources0% | 0% | 0% | 68% | 31%
aws_emr_launch/constructs/security_groups0% | 0% | 0% | 47% | 52%
extras/airflow0% | 0% | 0% | 15% | 84%
aws_emr_launch/constructs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in aws_emr_launch/control_plane/constructs/lambdas/apis.py
138 1 3
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/load_cluster_configuration/lambda_source.py
79 11 4
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/run_job_flow/lambda_source.py
71 13 4
def to_state_json()
in aws_emr_launch/constructs/step_functions/emr_tasks.py
64 1 1
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/check_cluster_status/lambda_source.py
61 9 4
def from_json()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
49 5 3
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/override_cluster_configs/lambda_source.py
43 20 4
def get_or_build()
in aws_emr_launch/constructs/lambdas/emr_lambdas.py
38 2 2
def get_or_build()
in aws_emr_launch/constructs/lambdas/emr_lambdas.py
37 2 3
def _create_policy_statements()
in aws_emr_launch/constructs/step_functions/emr_tasks.py
35 2 1
def to_json()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
35 5 1
def handler()
in aws_emr_launch/lambda_sources/emr_utilities/fail_if_cluster_running/lambda_source.py
32 10 4
def _create_policy_statements()
in aws_emr_launch/constructs/step_functions/emr_tasks.py
32 2 1
def _construct_security_configuration()
in aws_emr_launch/constructs/emr_constructs/emr_profile.py
32 6 3
def from_json()
in aws_emr_launch/constructs/step_functions/emr_launch_function.py
30 5 3
def _create_policy_statements()
in aws_emr_launch/constructs/step_functions/emr_tasks.py
29 2 1
def __init__()
in aws_emr_launch/constructs/managed_configurations/autoscaling_configuration.py
28 1 0
def __init__()
in aws_emr_launch/constructs/managed_configurations/instance_fleet_configuration.py
23 1 0
def __init__()
in aws_emr_launch/constructs/managed_configurations/instance_group_configuration.py
23 1 0
def visit()
in aws_emr_launch/constructs/iam_roles/permission_boundary_aspect.py
23 10 2