aws-quickstart / quickstart-tableau-sagemaker
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 17 units with 199 lines of code in units (81.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (71 lines of code)
    • 6 small units (94 lines of code)
    • 9 very small units (34 lines of code)
0% | 0% | 35% | 47% | 17%
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% | 35% | 47% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts/Authorizer0% | 0% | 57% | 22% | 19%
scripts/Evaluate0% | 0% | 0% | 82% | 17%
scripts/Info0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in scripts/Authorizer/lambda_function.py
40 9 2
def _addMethod()
in scripts/Authorizer/lambda_function.py
31 9 5
def lambda_handler()
in scripts/Info/lambda_function.py
19 1 2
def lambda_handler()
in scripts/Evaluate/lambda_function.py
18 3 2
def serialize_sagemaker_response()
in scripts/Evaluate/lambda_function.py
16 5 1
def _getStatementForEffect()
in scripts/Authorizer/lambda_function.py
14 5 3
def build()
in scripts/Authorizer/lambda_function.py
14 5 1
def get_sagemaker_response()
in scripts/Evaluate/lambda_function.py
13 2 4
def create_sagemaker_body()
in scripts/Evaluate/lambda_function.py
10 2 1
def _getEmptyStatement()
in scripts/Authorizer/lambda_function.py
7 1 2
def __init__()
in scripts/Authorizer/lambda_function.py
5 1 3
def allowAllMethods()
in scripts/Authorizer/lambda_function.py
2 1 1
def denyAllMethods()
in scripts/Authorizer/lambda_function.py
2 1 1
def allowMethod()
in scripts/Authorizer/lambda_function.py
2 1 3
def denyMethod()
in scripts/Authorizer/lambda_function.py
2 1 3
def allowMethodWithConditions()
in scripts/Authorizer/lambda_function.py
2 1 4
def denyMethodWithConditions()
in scripts/Authorizer/lambda_function.py
2 1 4