awslabs / rds-snapshot-tool
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 24 units with 448 lines of code in units (69.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (270 lines of code)
    • 7 small units (110 lines of code)
    • 9 very small units (68 lines of code)
0% | 0% | 60% | 24% | 15%
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% | 24% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/copy_snapshots_dest_rds0% | 0% | 100% | 0% | 0%
lambda/take_snapshots_rds0% | 0% | 100% | 0% | 0%
lambda/copy_snapshots_no_x_account_rds0% | 0% | 100% | 0% | 0%
lambda/delete_old_snapshots_no_x_account_rds0% | 0% | 100% | 0% | 0%
lambda/delete_old_snapshots_dest_rds0% | 0% | 100% | 0% | 0%
lambda/delete_old_snapshots_rds0% | 0% | 100% | 0% | 0%
lambda/share_snapshots_rds0% | 0% | 100% | 0% | 0%
lambda0% | 0% | 11% | 55% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in lambda/copy_snapshots_dest_rds/lambda_function.py
50 6 2
def lambda_handler()
in lambda/take_snapshots_rds/lambda_function.py
41 6 2
def lambda_handler()
in lambda/copy_snapshots_no_x_account_rds/lambda_function.py
37 4 2
def lambda_handler()
in lambda/delete_old_snapshots_no_x_account_rds/lambda_function.py
36 10 2
def lambda_handler()
in lambda/delete_old_snapshots_dest_rds/lambda_function.py
33 10 2
def lambda_handler()
in lambda/delete_old_snapshots_rds/lambda_function.py
26 7 2
def lambda_handler()
in lambda/share_snapshots_rds/lambda_function.py
25 7 2
def get_own_snapshots_source()
in lambda/snapshots_tool_utils.py
22 16 3
def copy_local()
in lambda/snapshots_tool_utils.py
20 2 2
def get_own_snapshots_no_x_account()
in lambda/snapshots_tool_utils.py
18 12 3
def copy_remote()
in lambda/snapshots_tool_utils.py
18 2 2
def filter_instances()
in lambda/snapshots_tool_utils.py
15 14 3
def get_shared_snapshots()
in lambda/snapshots_tool_utils.py
14 11 2
def get_own_snapshots_dest()
in lambda/snapshots_tool_utils.py
14 11 2
def get_latest_snapshot_ts()
in lambda/snapshots_tool_utils.py
11 6 2
def search_tag_shared()
in lambda/snapshots_tool_utils.py
10 10 1
def requires_backup()
in lambda/snapshots_tool_utils.py
10 5 3
def get_timestamp()
in lambda/snapshots_tool_utils.py
9 4 2
def paginate_api_call()
in lambda/snapshots_tool_utils.py
9 5 5
def search_tag_copied()
in lambda/snapshots_tool_utils.py
8 6 1