aws-samples / dataops-platform-airflow-dbt
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 20 units with 309 lines of code in units (30.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (124 lines of code)
    • 3 medium size units (91 lines of code)
    • 4 small units (63 lines of code)
    • 11 very small units (31 lines of code)
0% | 40% | 29% | 20% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 40% | 29% | 20% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dataops-infra/infra/stacks0% | 40% | 29% | 20% | 8%
dataops-infra/infra/stacks/fargate_services0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_security_groups()
in dataops-infra/infra/stacks/vpc_stack.py
73 1 1
def __init__()
in dataops-infra/infra/stacks/redshift_cluster_stack.py
51 1 5
def __init__()
in dataops-infra/infra/stacks/airflow_rds.py
42 1 5
def __init__()
in dataops-infra/infra/stacks/ecr_stack.py
26 1 4
def create_endpoints()
in dataops-infra/infra/stacks/vpc_stack.py
23 2 1
def __init__()
in dataops-infra/infra/stacks/airflow_redis.py
20 1 5
def __init__()
in dataops-infra/infra/stacks/s3_stack.py
16 1 4
def __init__()
in dataops-infra/infra/stacks/vpc_stack.py
15 1 4
def tag_subnets()
in dataops-infra/infra/stacks/vpc_stack.py
12 3 1
def subnets()
in dataops-infra/infra/stacks/vpc_stack.py
9 1 1
def get_vpc_private_subnet_ids()
in dataops-infra/infra/stacks/vpc_stack.py
4 1 1
def __init__()
in dataops-infra/infra/stacks/fargate_services/dbt.py
2 1 0
def __init__()
in dataops-infra/infra/stacks/fargate_services/airflow.py
2 1 0
def instance()
in dataops-infra/infra/stacks/airflow_rds.py
2 1 1
def instance()
in dataops-infra/infra/stacks/s3_stack.py
2 1 1
def __init__()
in dataops-infra/infra/stacks/airflow_cluster_stack.py
2 1 0
def instance()
in dataops-infra/infra/stacks/airflow_cluster_stack.py
2 1 1
def instance()
in dataops-infra/infra/stacks/airflow_redis.py
2 1 1
def instance()
in dataops-infra/infra/stacks/redshift_cluster_stack.py
2 1 1
def instance()
in dataops-infra/infra/stacks/vpc_stack.py
2 1 1