aws-samples / aws-secrets-manager-rotation-lambdas
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 149 units with 2,775 lines of code in units (95.6% of code).
    • 1 very long units (105 lines of code)
    • 6 long units (373 lines of code)
    • 28 medium size units (955 lines of code)
    • 82 small units (1,085 lines of code)
    • 32 very small units (257 lines of code)
3% | 13% | 34% | 39% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 13% | 34% | 39% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
SecretsManagerRDSSQLServerRotationMultiUser31% | 0% | 32% | 31% | 5%
SecretsManagerActiveDirectoryRotationSingleUser0% | 60% | 18% | 19% | <1%
SecretsManagerRedshiftRotationMultiUser0% | 40% | 18% | 31% | 9%
SecretsManagerRDSMySQLRotationMultiUser0% | 28% | 14% | 39% | 18%
SecretsManagerRDSSQLServerRotationSingleUser0% | 31% | 17% | 45% | 5%
SecretsManagerRDSOracleRotationMultiUser0% | 31% | 18% | 38% | 11%
SecretsManagerRDSMariaDBRotationMultiUser0% | 0% | 42% | 42% | 14%
SecretsManagerRDSPostgreSQLRotationMultiUser0% | 0% | 40% | 50% | 9%
SecretsManagerRDSPostgreSQLRotationSingleUser0% | 0% | 44% | 50% | 5%
SecretsManagerRDSMySQLRotationSingleUser0% | 0% | 45% | 40% | 14%
SecretsManagerMongoDBRotationMultiUser0% | 0% | 43% | 47% | 9%
SecretsManagerMongoDBRotationSingleUser0% | 0% | 45% | 49% | 5%
SecretsManagerRDSMariaDBRotationSingleUser0% | 0% | 45% | 42% | 12%
SecretsManagerRedshiftRotationSingleUser0% | 0% | 53% | 39% | 6%
SecretsManagerRDSOracleRotationSingleUser0% | 0% | 53% | 38% | 7%
SecretsManagerRotationTemplate0% | 0% | 52% | 21% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def apply_database_permissions()
in SecretsManagerRDSSQLServerRotationMultiUser/lambda_function.py
105 28 3
def lambda_handler()
in SecretsManagerActiveDirectoryRotationSingleUser/lambda_function.py
85 13 2
def set_secret()
in SecretsManagerRedshiftRotationMultiUser/lambda_function.py
67 23 3
def set_secret()
in SecretsManagerRDSMySQLRotationMultiUser/lambda_function.py
58 19 3
def execute_kinit_command()
in SecretsManagerActiveDirectoryRotationSingleUser/lambda_function.py
56 10 3
def set_secret()
in SecretsManagerRDSSQLServerRotationSingleUser/lambda_function.py
55 15 3
def set_secret()
in SecretsManagerRDSOracleRotationMultiUser/lambda_function.py
52 13 3
def set_secret()
in SecretsManagerRDSMariaDBRotationMultiUser/lambda_function.py
50 17 3
def set_secret()
in SecretsManagerRDSPostgreSQLRotationMultiUser/lambda_function.py
48 15 3
def set_secret()
in SecretsManagerRDSSQLServerRotationMultiUser/lambda_function.py
46 16 3
def set_secret()
in SecretsManagerRDSMySQLRotationSingleUser/lambda_function.py
43 15 3
def set_secret()
in SecretsManagerRDSPostgreSQLRotationSingleUser/lambda_function.py
43 15 3
def set_secret()
in SecretsManagerMongoDBRotationSingleUser/lambda_function.py
41 15 3
def set_secret()
in SecretsManagerMongoDBRotationMultiUser/lambda_function.py
41 12 3
def set_secret()
in SecretsManagerRDSMariaDBRotationSingleUser/lambda_function.py
40 16 3
def set_secret()
in SecretsManagerRedshiftRotationSingleUser/lambda_function.py
40 14 3
def set_secret()
in SecretsManagerRDSOracleRotationSingleUser/lambda_function.py
38 14 3
def set_password_for_login()
in SecretsManagerRDSSQLServerRotationMultiUser/lambda_function.py
32 14 4
def lambda_handler()
in SecretsManagerRDSMariaDBRotationSingleUser/lambda_function.py
30 10 2
def lambda_handler()
in SecretsManagerMongoDBRotationSingleUser/lambda_function.py
30 10 2