aws-samples / aws-multi-region-bc-dr-workshop
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 15 units with 329 lines of code in units (13.5% of code).
    • 1 very long units (174 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 8 small units (127 lines of code)
    • 6 very small units (28 lines of code)
52% | 0% | 0% | 38% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py52% | 0% | 0% | 38% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
app/mysfits-service/service74% | 0% | 0% | 20% | 5%
app/like-service/service0% | 0% | 0% | 81% | 18%
lab-1-xray/answers0% | 0% | 0% | 88% | 11%
Alternative Visuals
Longest Units
Top 15 longest units
Unit# linesMcCabe index# params
def mainSite()
in app/mysfits-service/service/mythicalMysfitsService.py
174 1 0
def getMysfitsJson()
in app/like-service/service/mysfitsTableClient.py
17 3 1
def queryMysfitItems()
in app/like-service/service/mysfitsTableClient.py
17 2 2
def getMysfitsJson()
in app/mysfits-service/service/mysfitsTableClient.py
17 3 1
def queryMysfitItems()
in app/mysfits-service/service/mysfitsTableClient.py
17 2 2
def like_mysfit()
in lab-1-xray/answers/mysfits_like.py
15 4 1
def like_mysfit()
in app/like-service/service/mysfits_like.py
15 4 1
def getMysfits()
in app/mysfits-service/service/mythicalMysfitsService.py
15 3 0
def likeMysfit()
in app/like-service/service/mysfitsTableClient.py
14 1 1
def getAllMysfits()
in app/like-service/service/mysfitsTableClient.py
7 6 0
def getAllMysfits()
in app/mysfits-service/service/mysfitsTableClient.py
7 6 0
def queryMysfits()
in app/like-service/service/mysfitsTableClient.py
5 1 1
def queryMysfits()
in app/mysfits-service/service/mysfitsTableClient.py
5 1 1
def health_check_response()
in lab-1-xray/answers/mysfits_like.py
2 1 0
def health_check_response()
in app/like-service/service/mysfits_like.py
2 1 0