aws-samples / aws-scheduled-event-adjuster
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 27 units with 233 lines of code in units (44.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 2 medium size units (71 lines of code)
    • 1 small units (11 lines of code)
    • 23 very small units (97 lines of code)
0% | 23% | 30% | 4% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 23% | 30% | 4% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
adjust_schedule_function/lib/processors0% | 46% | 35% | 0% | 18%
adjust_schedule_function/lib0% | 0% | 28% | 10% | 61%
adjust_schedule_function/adjust_schedule0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _process_asg()
in adjust_schedule_function/lib/processors/autoscaling.py
54 9 2
def process_resources()
in adjust_schedule_function/lib/processors/eventbridge.py
41 8 1
def calculate_recurrence()
in adjust_schedule_function/lib/recurrence.py
30 8 5
def emit_process_completed()
in adjust_schedule_function/lib/events.py
11 1 2
def parse_cron_expression()
in adjust_schedule_function/lib/recurrence.py
10 2 1
def lambda_handler()
in adjust_schedule_function/adjust_schedule/app.py
10 3 2
def process_resources()
in adjust_schedule_function/lib/processors/autoscaling.py
6 2 1
def get_asgs()
in adjust_schedule_function/lib/services.py
6 2 1
def get_asg_scheduled_actions()
in adjust_schedule_function/lib/services.py
6 2 2
def get_scheduled_rules()
in adjust_schedule_function/lib/services.py
6 4 1
def __init__()
in adjust_schedule_function/lib/services.py
5 2 2
def update_asg_scheduled_actions()
in adjust_schedule_function/lib/services.py
5 1 3
def __init__()
in adjust_schedule_function/lib/services.py
5 2 2
def __init__()
in adjust_schedule_function/lib/recurrence.py
5 2 2
def get_tag_by_key()
in adjust_schedule_function/lib/utils.py
5 2 2
def __init__()
in adjust_schedule_function/lib/processors/eventbridge.py
4 1 4
def __init__()
in adjust_schedule_function/lib/processors/autoscaling.py
4 1 4
def __init__()
in adjust_schedule_function/lib/processors/base.py
2 1 2
def _get_enabled_tag()
in adjust_schedule_function/lib/processors/base.py
2 1 1
def _get_local_timezone_tag()
in adjust_schedule_function/lib/processors/base.py
2 1 1