aws-samples / amazon-apigateway-accept-apikeys-as-querystring
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 13 units with 113 lines of code in units (45.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (47 lines of code)
    • 3 small units (42 lines of code)
    • 8 very small units (24 lines of code)
0% | 0% | 41% | 37% | 21%
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% | 41% | 37% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
auth_function0% | 0% | 47% | 28% | 24%
hello_world0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def _addMethod()
in auth_function/app.py
25 7 5
def lambda_handler()
in auth_function/app.py
22 1 2
def _getStatementForEffect()
in auth_function/app.py
14 5 3
def build()
in auth_function/app.py
14 5 1
def lambda_handler()
in hello_world/app.py
14 2 2
def _getEmptyStatement()
in auth_function/app.py
7 1 2
def __init__()
in auth_function/app.py
5 1 3
def allowAllMethods()
in auth_function/app.py
2 1 1
def denyAllMethods()
in auth_function/app.py
2 1 1
def allowMethod()
in auth_function/app.py
2 1 3
def denyMethod()
in auth_function/app.py
2 1 3
def allowMethodWithConditions()
in auth_function/app.py
2 1 4
def denyMethodWithConditions()
in auth_function/app.py
2 1 4