awslabs / aws-multi-account-viewer
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 86 units with 1,670 lines of code in units (42.0% of code).
    • 1 very long units (119 lines of code)
    • 3 long units (221 lines of code)
    • 23 medium size units (648 lines of code)
    • 27 small units (461 lines of code)
    • 32 very small units (221 lines of code)
7% | 13% | 38% | 27% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js14% | 6% | 16% | 42% | 20%
py0% | 19% | 59% | 14% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Front-End/src/pages18% | 7% | 0% | 52% | 21%
Back-End/lambdas0% | 19% | 59% | 14% | 6%
Front-End/src0% | 0% | 90% | 0% | 9%
Front-End/src/components0% | 0% | 76% | 0% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in Front-End/src/pages/Table.js
119 3 0
def lambda_handler()
in Back-End/lambdas/send_sqs_message.py
95 8 2
def compare_and_update_function()
in Back-End/lambdas/receive_sqs_message.py
74 23 4
render()
in Front-End/src/pages/Refresh.js
52 3 0
def get_all_load_balancers()
in Back-End/lambdas/receive_sqs_message.py
41 1 3
render()
in Front-End/src/components/Navigation.js
39 1 0
def get_all_network_interfaces()
in Back-End/lambdas/receive_sqs_message.py
38 3 3
def get_all_ec2()
in Back-End/lambdas/receive_sqs_message.py
36 7 3
def lambda_handler()
in Back-End/lambdas/receive_sqs_message.py
35 2 2
def get_all_lambda()
in Back-End/lambdas/receive_sqs_message.py
33 4 3
def get_all_rds()
in Back-End/lambdas/receive_sqs_message.py
32 4 3
def get_all_s3_buckets()
in Back-End/lambdas/receive_sqs_message.py
31 5 2
def get_all_odcr()
in Back-End/lambdas/receive_sqs_message.py
30 4 3
render()
in Front-End/src/App.js
30 1 0
def get_all_eks()
in Back-End/lambdas/receive_sqs_message.py
26 3 3
def get_all_iam_users()
in Back-End/lambdas/receive_sqs_message.py
26 5 2
def get_organizations()
in Back-End/lambdas/receive_sqs_message.py
26 5 3
def get_all_iam_roles()
in Back-End/lambdas/receive_sqs_message.py
25 5 2
def send_sqs_message()
in Back-End/lambdas/send_sqs_message.py
23 1 3
def get_all_ebs()
in Back-End/lambdas/receive_sqs_message.py
23 1 3