aws-samples / aws-iac-network-tester
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 8 units with 195 lines of code in units (18.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (140 lines of code)
    • 3 small units (48 lines of code)
    • 1 very small units (7 lines of code)
0% | 0% | 71% | 24% | 3%
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% | 71% | 24% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
check_network_test0% | 0% | 100% | 0% | 0%
retrieve_path_to_test0% | 0% | 53% | 46% | 0%
delete_test_resources0% | 0% | 58% | 30% | 11%
start_network_test0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in check_network_test/app.py
39 7 2
def lambda_handler()
in retrieve_path_to_test/app.py
35 6 2
def format_test_output()
in delete_test_resources/app.py
35 6 2
def lambda_handler()
in start_network_test/app.py
31 3 2
def inflight_routes_to_test()
in retrieve_path_to_test/app.py
19 2 3
def delete_network_insights_resources()
in delete_test_resources/app.py
18 5 1
def get_network_path_from_cfnoutput()
in retrieve_path_to_test/app.py
11 4 2
def lambda_handler()
in delete_test_resources/app.py
7 1 2