aws-quickstart / quickstart-ibm-cloud-pak-for-security
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 81 units with 1,070 lines of code in units (19.8% of code).
    • 1 very long units (155 lines of code)
    • 2 long units (180 lines of code)
    • 7 medium size units (225 lines of code)
    • 17 small units (240 lines of code)
    • 54 very small units (270 lines of code)
14% | 16% | 21% | 22% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py14% | 16% | 21% | 22% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts32% | 37% | 5% | 8% | 16%
scripts/yapl0% | 0% | 30% | 35% | 33%
scripts/pyca0% | 0% | 82% | 0% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def installOCP()
in scripts/cp4s_install.py
155 16 2
def run_install()
in scripts/cloud_install.py
93 3 1
def main()
in scripts/cp4s_install.py
87 9 2
def _exceptionStackTTB()
in scripts/yapl/Trace.py
42 13 4
def getInputArgs()
in scripts/yapl/Utilities.py
41 15 2
def _exceptionStackBTT()
in scripts/yapl/Trace.py
36 9 4
def generate_certs()
in scripts/pyca/ca.py
28 3 2
def _log()
in scripts/yapl/Trace.py
27 10 5
def __init()
in scripts/cp4s_install.py
27 2 4
def listFilesOfType()
in scripts/yapl/Utilities.py
24 11 2
def getS3Object()
in scripts/cp4s_install.py
20 5 4
def exportLogs()
in scripts/yapl/LogExporter.py
19 8 2
def bucketExists()
in scripts/yapl/S3Helper.py
19 5 2
def createBucket()
in scripts/yapl/S3Helper.py
18 5 3
def _coerceLevel()
in scripts/yapl/Trace.py
15 10 2
def _patternToRegEx()
in scripts/yapl/Trace.py
15 6 2
def __init__()
in scripts/yapl/LogExporter.py
15 5 5
def replaceTextInFile()
in scripts/yapl/Utilities.py
14 4 4
def parseTraceString()
in scripts/yapl/Trace.py
13 4 1
def showFile()
in scripts/yapl/Utilities.py
12 4 1