aws-samples / aws-secrets-manager-acm-certificate-rotation
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 2,632 units with 21,858 lines of code in units (74.5% of code).
    • 13 very long units (1,885 lines of code)
    • 26 long units (1,766 lines of code)
    • 171 medium size units (5,195 lines of code)
    • 326 small units (4,678 lines of code)
    • 2,096 very small units (8,334 lines of code)
8% | 8% | 23% | 21% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py8% | 7% | 23% | 21% | 38%
h0% | 45% | 20% | 19% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply35% | 11% | 24% | 11% | 16%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi12% | 14% | 30% | 18% | 23%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography/hazmat0% | 5% | 23% | 28% | 42%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser0% | 2% | 10% | 16% | 70%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography/x5090% | 0% | 14% | 25% | 60%
Lambda/Function0% | 0% | 69% | 28% | 1%
Lambda/Layer/crypto/python/lib/python3.8/site-packages0% | 0% | 15% | 22% | 61%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/pem0% | 0% | 48% | 0% | 51%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography0% | 0% | 10% | 34% | 55%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def parsedebug()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
215 20 6
def yacc()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
204 26 13
def parseopt()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
183 17 6
def parseopt_notrack()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
167 15 6
def write_c_source_to_f()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/recompiler.py
147 5 3
def _generate_cpy_function_decl()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/recompiler.py
139 37 3
def lr_parse_table()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
139 41 1
def new_primitive_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
137 36 2
def lex()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/lex.py
128 54 6
def _make_ffi_library()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/api.py
110 26 3
def parsegen()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/cpp.py
107 38 3
def new_array_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
106 29 3
def complete_struct_or_union()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
103 26 8
def new_function_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
88 20 4
def __init__()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/ciphers.py
88 13 5
def _struct_ctx()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/recompiler.py
84 26 5
def _get_struct_union_enum_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/cparser.py
84 4 5
def new_pointer_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
84 26 2
def token()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/lex.py
81 13 1
def _get_type_and_quals()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/cparser.py
79 28 5