aws-samples / ask-around-me
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 25 units with 157 lines of code in units (6.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (25 lines of code)
    • 3 small units (40 lines of code)
    • 21 very small units (92 lines of code)
0% | 0% | 15% | 25% | 58%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 15% | 25% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
frontend/src/auth0% | 0% | 31% | 32% | 35%
frontend/src/store0% | 0% | 0% | 29% | 70%
backend/streams/processAnswers0% | 0% | 0% | 0% | 100%
backend/questions/processQuestion0% | 0% | 0% | 0% | 100%
backend/answers/processAnswerGeo0% | 0% | 0% | 0% | 100%
backend/answers/processAnswerStar0% | 0% | 0% | 0% | 100%
backend/streams/processQuestions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async created()
in frontend/src/auth/index.js
25 4 0
saveQuestion()
in frontend/src/store/index.js
14 3 2
async handleRedirectCallback()
in frontend/src/auth/index.js
14 2 0
async loginWithPopup()
in frontend/src/auth/index.js
12 2 1
setPosition()
in frontend/src/store/index.js
10 1 2
updateQuestion()
in frontend/src/store/index.js
10 3 2
data()
in frontend/src/auth/index.js
10 1 0
deltaValue: parseInt()
in backend/streams/processAnswers/starEvents.js
8 2 1
deltaValue: parseInt()
in backend/streams/processAnswers/starEvents.js
8 2 1
setInitialized()
in frontend/src/store/index.js
4 1 2
latitude: parseFloat()
in backend/questions/processQuestion/app.js
4 1 1
setUser()
in frontend/src/store/index.js
3 1 2
setHashKey()
in frontend/src/store/index.js
3 1 2
setAllQuestions()
in frontend/src/store/index.js
3 1 2
loginWithRedirect()
in frontend/src/auth/index.js
3 1 1
getIdTokenClaims()
in frontend/src/auth/index.js
3 1 1
getTokenSilently()
in frontend/src/auth/index.js
3 1 1
getTokenWithPopup()
in frontend/src/auth/index.js
3 1 1
logout()
in frontend/src/auth/index.js
3 1 1
install()
in frontend/src/auth/index.js
3 1 2