aws-quickstart / quickstart-ribbon-sbc
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 3,024 units with 26,870 lines of code in units (67.7% of code).
    • 17 very long units (2,494 lines of code)
    • 39 long units (2,583 lines of code)
    • 222 medium size units (6,696 lines of code)
    • 390 small units (5,628 lines of code)
    • 2,356 very small units (9,469 lines of code)
9% | 9% | 24% | 20% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py9% | 9% | 24% | 20% | 35%
h0% | 27% | 37% | 19% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/KeyGen/pycparser21% | 8% | 18% | 12% | 38%
functions/source/KeyGen/cffi12% | 12% | 32% | 18% | 23%
functions/source/KeyGen/asn1crypto7% | 13% | 31% | 19% | 27%
scripts/ansible/scripts52% | 0% | 8% | 29% | 9%
functions/source/KeyGen/cryptography0% | 7% | 20% | 27% | 44%
functions/source/KeyGen0% | 0% | 21% | 19% | 59%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def readConfig()
in scripts/ansible/scripts/configGen.py
239 23 1
def parsedebug()
in functions/source/KeyGen/pycparser/ply/yacc.py
215 20 6
def yacc()
in functions/source/KeyGen/pycparser/ply/yacc.py
204 26 13
def parseopt()
in functions/source/KeyGen/pycparser/ply/yacc.py
183 17 6
def parseopt_notrack()
in functions/source/KeyGen/pycparser/ply/yacc.py
167 15 6
def _build()
in functions/source/KeyGen/asn1crypto/core.py
156 46 9
def write_c_source_to_f()
in functions/source/KeyGen/cffi/recompiler.py
147 5 3
def lr_parse_table()
in functions/source/KeyGen/pycparser/ply/yacc.py
139 41 1
def new_primitive_type()
in functions/source/KeyGen/cffi/backend_ctypes.py
137 36 2
def _generate_cpy_function_decl()
in functions/source/KeyGen/cffi/recompiler.py
132 35 3
def lex()
in functions/source/KeyGen/pycparser/ply/lex.py
128 54 6
def __init__()
in functions/source/KeyGen/asn1crypto/core.py
116 41 10
def _make_ffi_library()
in functions/source/KeyGen/cffi/api.py
110 26 3
def parsegen()
in functions/source/KeyGen/pycparser/ply/cpp.py
107 38 3
def new_array_type()
in functions/source/KeyGen/cffi/backend_ctypes.py
106 29 3
def _parse_children()
in functions/source/KeyGen/asn1crypto/core.py
105 40 2
def complete_struct_or_union()
in functions/source/KeyGen/cffi/backend_ctypes.py
103 26 8
def __init__()
in functions/source/KeyGen/cryptography/hazmat/backends/openssl/ciphers.py
89 16 5
def new_function_type()
in functions/source/KeyGen/cffi/backend_ctypes.py
88 20 4
def _encode_general_name()
in functions/source/KeyGen/cryptography/hazmat/backends/openssl/encode_asn1.py
85 3 2