aws-samples / kda-flink-app-autoscaling
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 21 units with 508 lines of code in units (47.9% of code).
    • 1 very long units (121 lines of code)
    • 2 long units (158 lines of code)
    • 4 medium size units (105 lines of code)
    • 4 small units (56 lines of code)
    • 10 very small units (68 lines of code)
23% | 31% | 20% | 11% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py23% | 31% | 20% | 11% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
step-scaling37% | 24% | 16% | 8% | 12%
targettracking-scaling0% | 42% | 27% | 14% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def put_alarms()
in step-scaling/index.py
121 8 2
def lambda_handler()
in targettracking-scaling/index.py
79 18 2
def lambda_handler()
in step-scaling/index.py
79 18 2
def get_scaling_policies()
in targettracking-scaling/index.py
28 3 1
def get_scaling_policies()
in step-scaling/index.py
28 3 1
def update_parallelism()
in step-scaling/index.py
25 2 4
def update_parallelism()
in targettracking-scaling/index.py
24 2 4
def get_resource_id()
in targettracking-scaling/index.py
14 2 1
def get_custom_role_arn()
in targettracking-scaling/index.py
14 2 1
def get_resource_id()
in step-scaling/index.py
14 2 1
def get_custom_role_arn()
in step-scaling/index.py
14 2 1
def response_function()
in targettracking-scaling/index.py
10 2 2
def response_function()
in step-scaling/index.py
10 2 2
def get_kinesis_stream()
in targettracking-scaling/index.py
6 2 0
def get_max_throughput_per_kpu()
in targettracking-scaling/index.py
6 2 0
def get_max_kpus()
in targettracking-scaling/index.py
6 2 0
def get_cloudwatch_alarm_in()
in step-scaling/index.py
6 2 0
def get_cloudwatch_alarm_out()
in step-scaling/index.py
6 2 0
def get_kinesis_stream()
in step-scaling/index.py
6 2 0
def get_max_throughput_per_kpu()
in step-scaling/index.py
6 2 0