aws-samples / amazon-cloudfront-waf-secretsmanager
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 11 units with 262 lines of code in units (22.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (79 lines of code)
    • 5 medium size units (141 lines of code)
    • 1 small units (12 lines of code)
    • 4 very small units (30 lines of code)
0% | 30% | 53% | 4% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 30% | 53% | 4% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda0% | 30% | 53% | 4% | 11%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def update_wafacl()
in lambda/lambda_function.py
79 3 2
def update_cfdistro()
in lambda/lambda_function.py
32 7 2
def lambda_handler()
in lambda/lambda_function.py
30 9 2
def set_secret()
in lambda/lambda_function.py
29 11 3
def test_secret()
in lambda/lambda_function.py
28 10 3
def create_secret()
in lambda/lambda_function.py
22 3 3
def finish_secret()
in lambda/lambda_function.py
12 4 3
def test_origin()
in lambda/lambda_function.py
10 2 2
def get_wafacl()
in lambda/lambda_function.py
8 1 0
def get_cfdistro()
in lambda/lambda_function.py
6 1 1
def get_cfdistro_config()
in lambda/lambda_function.py
6 1 1