aws-quickstart / quickstart-aws-industrial-machine-connectivity
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 43,028 units with 370,555 lines of code in units (70.3% of code).
    • 253 very long units (29,608 lines of code)
    • 419 long units (27,627 lines of code)
    • 2,634 medium size units (78,413 lines of code)
    • 6,406 small units (91,511 lines of code)
    • 33,316 very small units (143,396 lines of code)
7% | 7% | 21% | 24% | 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% | 20% | 24% | 38%
js0% | 12% | 45% | 31% | 10%
pyi0% | 0% | 0% | 64% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/StackCleanup17% | 6% | 19% | 21% | 34%
functions/source/GreengrassLambda39% | 5% | 15% | 15% | 23%
functions/source/ggdeployer3% | 7% | 23% | 25% | 39%
functions/source/sitewisemonitorfunction3% | 7% | 21% | 25% | 41%
functions/source/quicksightfunction3% | 7% | 21% | 25% | 41%
functions/source/AssetModelConverter3% | 7% | 21% | 26% | 40%
functions/source/AssetModelUpdater3% | 7% | 21% | 26% | 40%
functions/source/AssetModelIngestion3% | 7% | 21% | 25% | 41%
functions/source/UnifyServiceAccountHandler0% | 0% | 67% | 32% | 0%
functions/source/UnifySourceIngest0% | 0% | 29% | 40% | 29%
functions/source/unify_common0% | 0% | 0% | 88% | 11%
functions/source/SiteWiseDump0% | 0% | 0% | 37% | 62%
functions/source/UnifySiteWiseIngest0% | 0% | 0% | 68% | 32%
functions/source/UnifySiteWiseUpdater0% | 0% | 0% | 65% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def make_field_element()
in functions/source/sitewisemonitorfunction/docutils/writers/odf_odt/__init__.py
247 15 5
def make_field_element()
in functions/source/AssetModelIngestion/docutils/writers/odf_odt/__init__.py
247 15 5
def make_field_element()
in functions/source/AssetModelUpdater/docutils/writers/odf_odt/__init__.py
247 15 5
def make_field_element()
in functions/source/ggdeployer/docutils/writers/odf_odt/__init__.py
247 15 5
def make_field_element()
in functions/source/quicksightfunction/docutils/writers/odf_odt/__init__.py
247 15 5
def make_field_element()
in functions/source/AssetModelConverter/docutils/writers/odf_odt/__init__.py
247 15 5
def make_field_element()
in functions/source/StackCleanup/docutils/writers/odf_odt/__init__.py
247 15 5
def _iter()
in functions/source/sitewisemonitorfunction/dateutil/rrule.py
224 97 1
def _iter()
in functions/source/AssetModelIngestion/dateutil/rrule.py
224 97 1
def _iter()
in functions/source/AssetModelUpdater/dateutil/rrule.py
224 97 1
def _iter()
in functions/source/ggdeployer/dateutil/rrule.py
224 97 1
def _iter()
in functions/source/quicksightfunction/dateutil/rrule.py
224 97 1
def _iter()
in functions/source/AssetModelConverter/dateutil/rrule.py
224 97 1
def _iter()
in functions/source/StackCleanup/dateutil/rrule.py
224 97 1
def __init__()
in functions/source/sitewisemonitorfunction/dateutil/rrule.py
208 20 18
def __init__()
in functions/source/AssetModelIngestion/dateutil/rrule.py
208 20 18
def __init__()
in functions/source/AssetModelUpdater/dateutil/rrule.py
208 20 18
def __init__()
in functions/source/ggdeployer/dateutil/rrule.py
208 20 18
def __init__()
in functions/source/quicksightfunction/dateutil/rrule.py
208 20 18
def __init__()
in functions/source/AssetModelConverter/dateutil/rrule.py
208 20 18