aws-samples / event-driven-arch-eventbridge-lambda
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 10 units with 163 lines of code in units (34.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (68 lines of code)
    • 4 small units (69 lines of code)
    • 3 very small units (26 lines of code)
0% | 0% | 41% | 42% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 41% | 42% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambdas/files_generator0% | 0% | 100% | 0% | 0%
lambdas/on_file_converted0% | 0% | 52% | 0% | 47%
lambdas/on_file_receive0% | 0% | 0% | 100% | 0%
lambdas/on_file_validated0% | 0% | 0% | 73% | 26%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def handler()
in lambdas/files_generator/app.py
25 2 2
def generateFiles()
in lambdas/files_generator/app.py
22 4 2
def generateEvent()
in lambdas/on_file_converted/app.py
21 1 2
def generateEvent()
in lambdas/on_file_receive/app.py
20 1 2
def saveToDatabase()
in lambdas/on_file_validated/app.py
19 2 2
def convertFromXmlToJson()
in lambdas/on_file_receive/app.py
19 2 2
def handler()
in lambdas/on_file_receive/app.py
11 2 2
def validateContent()
in lambdas/on_file_converted/app.py
10 2 2
def handler()
in lambdas/on_file_converted/app.py
9 1 2
def handler()
in lambdas/on_file_validated/app.py
7 1 2