aws-solutions / workspaces-cost-optimizer
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 47 units with 741 lines of code in units (81.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 15 medium size units (399 lines of code)
    • 19 small units (268 lines of code)
    • 13 very small units (74 lines of code)
0% | 0% | 53% | 36% | 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% | 0% | 53% | 36% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ecs0% | 0% | 52% | 37% | 9%
lambda0% | 0% | 81% | 18% | 0%
ecs/utils0% | 0% | 34% | 44% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def process_directory()
in source/ecs/directory_reader.py
50 4 4
def process_workspace()
in source/ecs/workspaces_helper.py
37 2 2
def get_termination_status()
in source/ecs/workspaces_helper.py
29 8 4
def set_stack_parameters()
in source/ecs/workspaces_app.py
28 5 0
def get_user_sessions()
in source/ecs/metrics_helper.py
28 10 3
def lambda_handler()
in source/lambda/create-task.py
27 1 2
def get_cloudwatch_metric_data_points()
in source/ecs/metrics_helper.py
24 4 4
def get_workspaces_directories()
in source/ecs/workspaces_app.py
23 3 1
def check_if_workspace_available_on_first_day()
in source/ecs/workspaces_helper.py
23 3 2
def send()
in source/lambda/uuid-helper.py
23 3 6
def process_directories()
in source/ecs/workspaces_app.py
22 3 1
def compare_usage_metrics()
in source/ecs/workspaces_helper.py
22 5 5
def send_metrics()
in source/ecs/utils/solution_metrics.py
21 2 2
def get_workspaces_for_directory()
in source/ecs/workspaces_helper.py
21 3 2
def compare_usage_metrics_for_always_on()
in source/ecs/workspaces_helper.py
21 8 5
def get_list_time_ranges()
in source/ecs/metrics_helper.py
19 2 3
def modify_workspace_properties()
in source/ecs/workspaces_helper.py
18 4 3
def get_valid_workspaces_regions()
in source/ecs/workspaces_app.py
17 5 1
def terminate_unused_workspace()
in source/ecs/workspaces_helper.py
17 3 2
def append_entry()
in source/ecs/workspaces_helper.py
17 1 3