aws-samples / sql-based-etl-on-amazon-eks
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 29 units with 463 lines of code in units (26.2% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (213 lines of code)
    • 4 medium size units (113 lines of code)
    • 6 small units (92 lines of code)
    • 16 very small units (45 lines of code)
0% | 46% | 24% | 19% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 48% | 25% | 17% | 8%
js0% | 0% | 0% | 69% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib/cdk_infra0% | 47% | 34% | 12% | 5%
source/lib0% | 84% | 0% | 0% | 15%
source/lib/util0% | 0% | 33% | 66% | 0%
deployment/cdk-solution-helper0% | 0% | 0% | 69% | 30%
deployment/app_code/job0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in spark-on-eks/source/lib/spark_on_eks_stack.py
87 2 5
def __init__()
in spark-on-eks/source/lib/cdk_infra/spark_permission.py
69 6 8
def __init__()
in spark-on-eks/source/lib/cdk_infra/eks_base_app.py
57 1 5
def __init__()
in spark-on-eks/source/lib/cdk_infra/eks_cluster.py
33 1 8
def __init__()
in spark-on-eks/source/lib/cdk_infra/iam_roles.py
31 1 5
def __init__()
in spark-on-eks/source/lib/cdk_infra/eks_service_account.py
27 5 6
def load_yaml_replace_var_local()
in spark-on-eks/source/lib/util/manifest_reader.py
22 6 4
def load_yaml_local()
in spark-on-eks/source/lib/util/manifest_reader.py
17 3 2
def __init__()
in spark-on-eks/source/lib/cdk_infra/network_sg.py
17 1 6
def __init__()
in spark-on-eks/source/lib/cdk_infra/s3_app_code.py
16 1 4
function setParameter()
in spark-on-eks/deployment/cdk-solution-helper/index.js
16 3 1
def load_yaml_replace_var_remotely()
in spark-on-eks/source/lib/util/manifest_reader.py
14 4 3
def load_yaml_remotely()
in spark-on-eks/source/lib/util/manifest_reader.py
12 2 2
def parse_data_from_kafka_message()
in spark-on-eks/deployment/app_code/job/msk_consumer.py
8 4 2
function assetRef()
in spark-on-eks/deployment/cdk-solution-helper/index.js
7 2 1
def __init__()
in spark-on-eks/source/lib/cloud_front_stack.py
5 1 7
def code_bucket()
in spark-on-eks/source/lib/spark_on_eks_stack.py
2 1 1
def argo_url()
in spark-on-eks/source/lib/spark_on_eks_stack.py
2 1 1
def jhub_url()
in spark-on-eks/source/lib/spark_on_eks_stack.py
2 1 1
def jhub_cf()
in spark-on-eks/source/lib/cloud_front_stack.py
2 1 1