aws-samples / aws-dev-hour-backend
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 11 units with 411 lines of code in units (85.6% of code).
    • 1 very long units (268 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (61 lines of code)
    • 4 small units (62 lines of code)
    • 4 very small units (20 lines of code)
65% | 0% | 14% | 15% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts87% | 0% | 10% | 0% | 1%
py0% | 0% | 26% | 58% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib87% | 0% | 10% | 0% | 1%
rekognitionlambda0% | 0% | 45% | 29% | 25%
servicelambda0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
constructor()
in lib/awsdevhour-stack.ts
268 1 3
constructor()
in lib/awsdevhour-backend-pipeline-stack.ts
33 1 3
def rekFunction()
in rekognitionlambda/index.py
28 7 2
def generateThumb()
in rekognitionlambda/index.py
18 6 2
def handler()
in servicelambda/index.py
17 4 2
def deleteImage()
in servicelambda/index.py
16 4 1
def getLabelsFunction()
in servicelambda/index.py
11 2 1
def handler()
in rekognitionlambda/index.py
10 4 2
constructor()
in lib/awsdevhour-backend-pipeline-stage.ts
4 1 3
def resize_image()
in rekognitionlambda/index.py
4 2 2
def replaceSubstringWithColon()
in rekognitionlambda/index.py
2 1 1