aws-quickstart / quickstart-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 70 units with 900 lines of code in units (14.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 18 medium size units (543 lines of code)
    • 11 small units (146 lines of code)
    • 41 very small units (211 lines of code)
0% | 0% | 60% | 16% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 60% | 16% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/CleanupLoadBalancers0% | 0% | 97% | 0% | 2%
functions/source/registerType0% | 0% | 71% | 10% | 17%
build0% | 0% | 63% | 0% | 36%
functions/source/KubeManifest0% | 0% | 27% | 33% | 38%
functions/source/registerCustomResource0% | 0% | 67% | 18% | 13%
functions/source/ResourceReader0% | 0% | 72% | 16% | 10%
functions/source/CleanupSecurityGroupDependencies0% | 0% | 64% | 22% | 13%
functions/source/DeleteBucketContents0% | 0% | 94% | 0% | 5%
functions/source/GetCallerArn0% | 0% | 57% | 20% | 22%
functions/source/KubeGet0% | 0% | 68% | 0% | 31%
functions/source/FargateProfile0% | 0% | 50% | 28% | 21%
functions/source/CleanupLambdas0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def register()
in functions/source/registerType/lambda_function.py
48 11 2
def put_role()
in functions/source/registerType/lambda_function.py
37 14 3
def get_instances()
in build/update_instance_types.py
34 13 2
def delete_dependencies()
in functions/source/CleanupSecurityGroupDependencies/lambda_function.py
34 16 2
def delete_objects()
in functions/source/DeleteBucketContents/lambda_function.py
33 13 2
def delete_handler()
in functions/source/CleanupLoadBalancers/lambda_function.py
33 16 2
def enable_proxy()
in functions/source/KubeManifest/lambda_function.py
31 2 2
def get_caller_arn()
in functions/source/GetCallerArn/lambda_function.py
31 7 1
def create_handler()
in functions/source/KubeGet/lambda_function.py
30 8 2
def del_sgs()
in functions/source/CleanupLoadBalancers/lambda_function.py
30 9 2
def put_role()
in functions/source/registerCustomResource/lambda_function.py
27 9 3
def put_function()
in functions/source/registerCustomResource/lambda_function.py
27 3 3
def handler_init()
in functions/source/KubeManifest/lambda_function.py
27 8 1
def eval_filter()
in build/update_instance_types.py
26 12 2
def delete_dependencies()
in functions/source/CleanupLoadBalancers/lambda_function.py
25 15 2
def send()
in functions/source/ResourceReader/lambda.py
25 4 7
def create()
in functions/source/FargateProfile/lambda_function.py
23 6 2
def handler()
in functions/source/ResourceReader/lambda.py
22 6 2
def run_command()
in functions/source/KubeManifest/lambda_function.py
19 6 1
def register()
in functions/source/registerCustomResource/lambda_function.py
15 4 2