aws-samples / no-tears-cluster
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 1,806 units with 31,138 lines of code in units (63.5% of code).
    • 157 very long units (16,495 lines of code)
    • 18 long units (1,184 lines of code)
    • 139 medium size units (4,162 lines of code)
    • 270 small units (3,952 lines of code)
    • 1,222 very small units (5,345 lines of code)
52% | 3% | 13% | 12% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py52% | 3% | 13% | 12% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/c9bootstrap/idna95% | 0% | 3% | <1% | <1%
functions/source/c9InstanceProfile/idna95% | 0% | 3% | <1% | <1%
pcluster96% | 0% | 0% | 0% | 3%
functions/source/c9bootstrap/requests0% | 13% | 27% | 25% | 33%
functions/source/c9InstanceProfile/requests0% | 13% | 27% | 25% | 33%
functions/source/c9bootstrap/urllib30% | 6% | 25% | 27% | 39%
functions/source/c9InstanceProfile/urllib30% | 6% | 25% | 27% | 39%
functions/source/c9bootstrap/chardet0% | 6% | 21% | 30% | 41%
functions/source/c9InstanceProfile/chardet0% | 6% | 21% | 30% | 41%
functions/source/c9bootstrap/crhelper0% | 0% | 32% | 31% | 36%
functions/source/c9InstanceProfile/crhelper0% | 0% | 32% | 31% | 36%
functions/source/c9bootstrap0% | 0% | 51% | 28% | 20%
ROOT0% | 0% | 100% | 0% | 0%
functions/source/c9keypair0% | 0% | 56% | 43% | 0%
functions/source/c9InstanceProfile0% | 0% | 0% | 51% | 48%
functions/source/c9bootstrap/certifi0% | 0% | 0% | 0% | 100%
functions/source/c9InstanceProfile/certifi0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in pcluster/pcluster_stack.py
427 26 4
def _seg_0()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_1()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_2()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_3()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_4()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_5()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_6()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_7()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_8()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_9()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_10()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_11()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_12()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_13()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_14()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_15()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_16()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_17()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0
def _seg_18()
in functions/source/c9bootstrap/idna/uts46data.py
103 1 0