aws-quickstart / quickstart-aem-opencloud
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 5,266 units with 50,112 lines of code in units (70.1% of code).
    • 20 very long units (2,790 lines of code)
    • 83 long units (5,539 lines of code)
    • 445 medium size units (13,636 lines of code)
    • 769 small units (11,367 lines of code)
    • 3,949 very small units (16,780 lines of code)
5% | 11% | 27% | 22% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py5% | 10% | 27% | 22% | 33%
h0% | 45% | 20% | 19% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/generateAemSslCertificate7% | 7% | 23% | 22% | 39%
functions/source/syncEditPackerConfig3% | 14% | 30% | 23% | 28%
functions/source/syncEditStackFacts3% | 14% | 30% | 23% | 28%
functions/source/syncEditStackConfig3% | 14% | 31% | 23% | 28%
functions/source/ACMCert79% | 0% | 20% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def parsedebug()
in functions/source/generateAemSslCertificate/pycparser/ply/yacc.py
215 20 6
def yacc()
in functions/source/generateAemSslCertificate/pycparser/ply/yacc.py
204 26 13
def parseopt()
in functions/source/generateAemSslCertificate/pycparser/ply/yacc.py
183 17 6
def parseopt_notrack()
in functions/source/generateAemSslCertificate/pycparser/ply/yacc.py
167 15 6
def write_c_source_to_f()
in functions/source/generateAemSslCertificate/cffi/recompiler.py
149 6 3
def _generate_cpy_function_decl()
in functions/source/generateAemSslCertificate/cffi/recompiler.py
139 37 3
def lr_parse_table()
in functions/source/generateAemSslCertificate/pycparser/ply/yacc.py
139 41 1
def parse_node()
in functions/source/syncEditStackFacts/ruamel/yaml/parser.py
137 34 3
def parse_node()
in functions/source/syncEditStackConfig/ruamel/yaml/parser.py
137 34 3
def parse_node()
in functions/source/syncEditPackerConfig/ruamel/yaml/parser.py
137 34 3
def new_primitive_type()
in functions/source/generateAemSslCertificate/cffi/backend_ctypes.py
137 36 2
def analyze_scalar()
in functions/source/syncEditStackFacts/ruamel/yaml/emitter.py
130 31 2
def analyze_scalar()
in functions/source/syncEditStackConfig/ruamel/yaml/emitter.py
130 31 2
def analyze_scalar()
in functions/source/syncEditPackerConfig/ruamel/yaml/emitter.py
130 31 2
def lex()
in functions/source/generateAemSslCertificate/pycparser/ply/lex.py
128 54 6
def _make_ffi_library()
in functions/source/generateAemSslCertificate/cffi/api.py
110 26 3
def parsegen()
in functions/source/generateAemSslCertificate/pycparser/ply/cpp.py
107 38 3
def new_array_type()
in functions/source/generateAemSslCertificate/cffi/backend_ctypes.py
106 29 3
def complete_struct_or_union()
in functions/source/generateAemSslCertificate/cffi/backend_ctypes.py
103 26 8
def handler()
in functions/source/ACMCert/lambda_function.py
102 29 2