awslabs / digital-user-engagement-events-database
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,739 units with 30,330 lines of code in units (63.2% of code).
    • 158 very long units (16,274 lines of code)
    • 18 long units (1,178 lines of code)
    • 133 medium size units (4,014 lines of code)
    • 258 small units (3,770 lines of code)
    • 1,172 very small units (5,094 lines of code)
53% | 3% | 13% | 12% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py53% | 3% | 13% | 12% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
custom-bucket-name-helper/idna95% | 0% | 3% | <1% | <1%
custom-resource-helper/idna95% | 0% | 3% | <1% | <1%
custom-bucket-name-helper/requests0% | 13% | 27% | 25% | 33%
custom-resource-helper/requests0% | 13% | 27% | 25% | 33%
custom-bucket-name-helper/urllib30% | 6% | 24% | 28% | 40%
custom-resource-helper/urllib30% | 6% | 24% | 28% | 40%
custom-bucket-name-helper/chardet0% | 6% | 21% | 30% | 41%
custom-resource-helper/chardet0% | 6% | 21% | 30% | 41%
custom-resource-helper0% | 0% | 100% | 0% | 0%
athena-partition-lambda0% | 0% | 100% | 0% | 0%
custom-bucket-name-helper0% | 0% | 100% | 0% | 0%
lib0% | 0% | 100% | 0% | 0%
custom-bucket-name-helper/certifi0% | 0% | 0% | 0% | 100%
custom-resource-helper/certifi0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _seg_0()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_1()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_2()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_3()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_4()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_5()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_6()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_7()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_8()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_9()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_10()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_11()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_12()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_13()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_14()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_15()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_16()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_17()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_18()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0
def _seg_19()
in source/custom-bucket-name-helper/idna/uts46data.py
103 1 0