aws-samples / aws-decoupled-serverless-scheduler
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 18 units with 300 lines of code in units (72.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (161 lines of code)
    • 6 small units (84 lines of code)
    • 7 very small units (55 lines of code)
0% | 0% | 53% | 28% | 18%
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% | 53% | 28% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/trigger_step_function0% | 0% | 100% | 0% | 0%
src/s3_trigger0% | 0% | 100% | 0% | 0%
src/dynamo_db0% | 0% | 100% | 0% | 0%
src/ec2_scale0% | 0% | 80% | 0% | 19%
src/get_job0% | 0% | 100% | 0% | 0%
src/final_terminate0% | 0% | 0% | 100% | 0%
src/wait_ec20% | 0% | 0% | 100% | 0%
src/sqs_check0% | 0% | 0% | 100% | 0%
src/protect_ec20% | 0% | 0% | 100% | 0%
src/extract_job0% | 0% | 0% | 100% | 0%
src/add_sqs0% | 0% | 0% | 100% | 0%
src/failed_job0% | 0% | 0% | 0% | 100%
src/check_job0% | 0% | 0% | 0% | 100%
src/sqs_out0% | 0% | 0% | 0% | 100%
src/start_job0% | 0% | 0% | 0% | 100%
src/delete_job0% | 0% | 0% | 0% | 100%
src/confirm_result0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def handler()
in src/trigger_step_function/index.py
40 8 2
def handler()
in src/s3_trigger/index.py
36 9 2
def handler()
in src/dynamo_db/index.py
33 2 2
def handler()
in src/ec2_scale/index.py
29 3 2
def handler()
in src/get_job/index.py
23 2 2
def handler()
in src/final_terminate/index.py
18 3 2
def handler()
in src/wait_ec2/index.py
15 1 2
def handler()
in src/sqs_check/index.py
14 2 2
def handler()
in src/protect_ec2/index.py
13 3 2
def handler()
in src/extract_job/index.py
12 1 2
def handler()
in src/add_sqs/index.py
12 3 2
def handler()
in src/failed_job/index.py
10 2 2
def handler()
in src/check_job/index.py
9 2 2
def handler()
in src/sqs_out/index.py
9 1 2
def handler()
in src/start_job/index.py
9 1 2
def new_capacity()
in src/ec2_scale/index.py
7 1 2
def handler()
in src/delete_job/index.py
7 1 2
def handler()
in src/confirm_result/index.py
4 2 2