aws-samples / sql-database-client-side-encryption-example-application
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 12 units with 166 lines of code in units (5.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (96 lines of code)
    • 3 small units (46 lines of code)
    • 6 very small units (24 lines of code)
0% | 0% | 57% | 27% | 14%
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% | 57% | 27% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
webapp/app/encryptioncontext0% | 0% | 95% | 0% | 4%
webapp/app/codecompose0% | 0% | 50% | 49% | 0%
cloudformation/functions/source/database-resource-id-custom-resource0% | 0% | 0% | 72% | 28%
cloudformation/functions/source/dba-account-creation0% | 0% | 0% | 0% | 100%
cloudformation/functions/source/verify-iam-database-authentication0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
def authenticate()
in webapp/app/encryptioncontext/views.py
40 6 1
def get_secret()
in webapp/app/codecompose/secretsmanager.py
29 6 0
def create()
in webapp/app/encryptioncontext/views.py
27 5 1
def create()
in cloudformation/functions/source/database-resource-id-custom-resource/app.py
18 4 2
15 3 0
13 2 0
def lambda_handler()
in cloudformation/functions/source/dba-account-creation/app.py
9 1 2
def lambda_handler()
in cloudformation/functions/source/verify-iam-database-authentication/app.py
5 1 2
def index()
in webapp/app/encryptioncontext/views.py
3 1 1
def lambda_handler()
in cloudformation/functions/source/database-resource-id-custom-resource/app.py
3 1 2
def update()
in cloudformation/functions/source/database-resource-id-custom-resource/app.py
2 1 2
def delete()
in cloudformation/functions/source/database-resource-id-custom-resource/app.py
2 1 2