aws-samples / aws-gateway-load-balancer-code-samples
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 32 units with 455 lines of code in units (5.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (102 lines of code)
    • 19 small units (278 lines of code)
    • 9 very small units (75 lines of code)
0% | 0% | 22% | 61% | 16%
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% | 22% | 61% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/gwlb0% | 0% | 33% | 53% | 12%
python/vpce0% | 0% | 0% | 76% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in python/gwlb/create_gwlb_tg_listener_sample.py
35 1 0
def create_gwlb()
in python/gwlb/create_gwlb_sample.py
23 2 2
def create_gwlb()
in python/gwlb/create_gwlb_tg_listener_sample.py
23 2 2
def main()
in python/gwlb/create_tg_sample.py
21 1 0
def create_tg()
in python/gwlb/create_gwlb_tg_listener_sample.py
18 2 1
def create_tg()
in python/gwlb/create_tg_sample.py
18 2 1
def delete_gwlb()
in python/gwlb/delete_gwlb_tg_sample.py
17 2 1
def delete_gwlb()
in python/gwlb/delete_gwlb_sample.py
17 2 1
def modify_vpce_service_permissions()
in python/vpce/modify_vpce_service_permissions_sample.py
17 4 3
def create_fwd_listener()
in python/gwlb/create_gwlb_tg_listener_sample.py
16 2 2
def create_fwd_listener()
in python/gwlb/create_listener_sample.py
16 2 2
def register_targets()
in python/gwlb/create_gwlb_tg_listener_sample.py
15 2 2
def register_targets()
in python/gwlb/register_targets_sample.py
15 2 2
def create_gwlbe()
in python/vpce/create_gwlb_endpoint_sample.py
15 2 3
def main()
in python/vpce/create_gwlb_endpoint_sample.py
15 1 0
def main()
in python/vpce/modify_vpce_service_permissions_sample.py
14 1 0
def main()
in python/vpce/create_vpce_service_configuration_sample.py
14 1 0
def create_vpce_service()
in python/vpce/create_vpce_service_configuration_sample.py
13 2 2
def main()
in python/gwlb/create_gwlb_sample.py
12 1 0
def modify_vpce_service_acceptance()
in python/vpce/modify_vpce_service_configuration_sample.py
12 2 2