aws-samples / iot-provisioning-secretfree
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 24 units with 323 lines of code in units (39.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (164 lines of code)
    • 6 small units (105 lines of code)
    • 13 very small units (54 lines of code)
0% | 0% | 50% | 32% | 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% | 50% | 32% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda-issuer-acmpca0% | 0% | 57% | 32% | 9%
lambda-authorizer0% | 0% | 45% | 25% | 28%
lambda-issuer-iotcore0% | 0% | 47% | 40% | 11%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def deploy_policy()
in lambda-issuer-iotcore/main.py
44 1 3
def deploy_policy()
in lambda-issuer-acmpca/main.py
44 1 3
def lambda_handler()
in lambda-authorizer/main.py
26 5 2
def _addMethod()
in lambda-authorizer/main.py
25 7 5
def provision_certificate()
in lambda-issuer-acmpca/main.py
25 3 1
def deploy_thing()
in lambda-issuer-iotcore/main.py
20 4 2
def deploy_thing()
in lambda-issuer-acmpca/main.py
20 4 2
def lambda_handler()
in lambda-issuer-acmpca/main.py
19 9 2
def lambda_handler()
in lambda-issuer-iotcore/main.py
18 7 2
def _getStatementForEffect()
in lambda-authorizer/main.py
14 5 3
def build()
in lambda-authorizer/main.py
14 5 1
def provision_certificate()
in lambda-issuer-iotcore/main.py
9 2 1
def deploy_certificate()
in lambda-issuer-acmpca/main.py
9 3 1
def get_pubkey()
in lambda-authorizer/main.py
8 1 1
def _getEmptyStatement()
in lambda-authorizer/main.py
7 1 2
def __init__()
in lambda-authorizer/main.py
5 1 3
def deploy_certificate()
in lambda-issuer-iotcore/main.py
2 1 1
def allowAllMethods()
in lambda-authorizer/main.py
2 1 1
def denyAllMethods()
in lambda-authorizer/main.py
2 1 1
def allowMethod()
in lambda-authorizer/main.py
2 1 3