aws-samples / tgw-attachment-tagger
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 18 units with 206 lines of code in units (19.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (82 lines of code)
    • 5 small units (73 lines of code)
    • 10 very small units (51 lines of code)
0% | 0% | 39% | 35% | 24%
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% | 39% | 35% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 39% | 35% | 24%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def list_transit_gateway_attachments()
in src/tgw-attachment-query-lambda-src.py
38 11 2
def list_tgw_route_tables()
in src/tgw-rtb-query-lambda-src.py
22 3 1
def search_rtb_for_attachment()
in src/tgw-rtb-query-lambda-src.py
22 3 3
def tag_tgw_attachment()
in src/tgw-attachment-tagger-lambda-src.py
18 1 2
def get_account_details_from_organization()
in src/aws-organizations-lambda-src.py
16 4 1
def assume_role()
in src/aws-organizations-lambda-src.py
14 1 1
def lambda_handler()
in src/tgw-attachment-tagger-lambda-src.py
13 5 2
def lambda_handler()
in src/tgw-rtb-query-lambda-src.py
12 3 2
def find_tgw_attachment_cidr()
in src/tgw-rtb-query-lambda-src.py
10 4 3
def lambda_handler()
in src/tgw-attachment-query-lambda-src.py
9 3 2
def lambda_handler()
in src/aws-organizations-lambda-src.py
8 1 2
def log_exception()
in src/tgw-attachment-query-lambda-src.py
4 1 3
def log_exception()
in src/tgw-rtb-query-lambda-src.py
4 1 3
def log_exception()
in src/aws-organizations-lambda-src.py
4 1 3
def log_exception()
in src/tgw-attachment-tagger-lambda-src.py
4 1 3
def get_ec2_client()
in src/tgw-rtb-query-lambda-src.py
3 1 1
def get_ec2_client()
in src/tgw-attachment-tagger-lambda-src.py
3 1 1
def get_ec2_client()
in src/tgw-attachment-query-lambda-src.py
2 1 1