aws-quickstart / quickstart-redhat-openshift
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,989 units with 43,542 lines of code in units (64.5% of code).
    • 96 very long units (10,513 lines of code)
    • 56 long units (3,702 lines of code)
    • 306 medium size units (9,209 lines of code)
    • 538 small units (7,815 lines of code)
    • 2,993 very small units (12,303 lines of code)
24% | 8% | 21% | 17% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py24% | 8% | 21% | 17% | 28%
h0% | 27% | 37% | 19% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/DeleteBucketContents52% | 3% | 13% | 12% | 17%
functions/source/KeyGen8% | 9% | 25% | 20% | 35%
scripts/scaling/aws_openshift_quickstart14% | 20% | 28% | 20% | 16%
functions/source/ACMCert79% | 0% | 20% | 0% | 0%
functions/source/OpenShiftResource0% | 43% | 23% | 21% | 11%
functions/source/CleanupPV0% | 0% | 78% | 21% | 0%
functions/source/UnSubscribe0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
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 scale_inventory_groups()
in scripts/scaling/aws_openshift_quickstart/scaler.py
120 2 1
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 handler()
in functions/source/ACMCert/lambda_function.py
104 30 2
def _seg_0()
in functions/source/DeleteBucketContents/idna/uts46data.py
103 1 0
def _seg_1()
in functions/source/DeleteBucketContents/idna/uts46data.py
103 1 0
def _seg_2()
in functions/source/DeleteBucketContents/idna/uts46data.py
103 1 0