aws-samples / fedramp-integrated-inventory-workbook
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 221 lines of code in units (53.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (74 lines of code)
    • 4 small units (64 lines of code)
    • 20 very small units (83 lines of code)
0% | 0% | 33% | 28% | 37%
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% | 33% | 28% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/inventory0% | 0% | 33% | 28% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def execute()
in src/inventory/reports.py
26 2 2
def _do_mapping()
in src/inventory/mappers.py
26 5 2
def _get_resources_from_account()
in src/inventory/readers.py
22 4 2
def __init__()
in src/inventory/mappers.py
18 1 17
def get_resources_from_all_accounts()
in src/inventory/readers.py
18 8 1
def _do_mapping()
in src/inventory/mappers.py
17 6 2
def _do_mapping()
in src/inventory/mappers.py
11 3 2
def execute()
in src/inventory/reports.py
9 1 2
def lambda_handler()
in src/inventory/handler.py
9 1 2
def _do_mapping()
in src/inventory/mappers.py
9 1 2
def map()
in src/inventory/mappers.py
8 2 2
def _get_ip_addresses()
in src/inventory/mappers.py
7 6 2
def _get_config_client()
in src/inventory/readers.py
6 1 2
def _get_asset_type_name()
in src/inventory/mappers.py
5 2 2
def __init__()
in src/inventory/readers.py
4 1 3
def _write_cell_if_value_provided()
in src/inventory/reports.py
3 2 5
def _get_aws_partition()
in src/inventory/readers.py
3 2 1
def __init__()
in src/inventory/reports.py
2 1 2
def __init__()
in src/inventory/handler.py
2 1 1
def _get_tag_value()
in src/inventory/mappers.py
2 3 2