aws-samples / amazon-transcribe-web-ui-demo
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 31 units with 623 lines of code in units (29.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (127 lines of code)
    • 9 medium size units (317 lines of code)
    • 5 small units (85 lines of code)
    • 15 very small units (94 lines of code)
0% | 20% | 50% | 13% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 19% | 66% | 8% | 4%
tsx0% | 21% | 25% | 21% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
transcribe-ui-backend/provisioning/lib/construct0% | 29% | 61% | 5% | 3%
transcribe-ui-frontend/frontend/src/components0% | 24% | 29% | 24% | 21%
transcribe-ui-frontend/provisioning/lib/construct0% | 0% | 100% | 0% | 0%
transcribe-ui-frontend/provisioning/lib/stack0% | 0% | 100% | 0% | 0%
transcribe-ui-backend/provisioning/lib/stack0% | 0% | 0% | 100% | 0%
transcribe-ui-frontend/frontend/src0% | 0% | 0% | 0% | 100%
transcribe-ui-frontend/frontend/src/mocks0% | 0% | 0% | 0% | 100%
transcribe-ui-backend/lambda0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in transcribe-ui-backend/provisioning/lib/construct/api.ts
75 1 3
Header: transVocabularies()
in transcribe-ui-frontend/frontend/src/components/VocabularyList.tsx
52 1 1
constructor()
in transcribe-ui-frontend/provisioning/lib/construct/frontend-service.ts
50 1 3
constructor()
in transcribe-ui-frontend/provisioning/lib/stack/frontend.ts
47 1 2
constructor()
in transcribe-ui-backend/provisioning/lib/construct/events.ts
40 3 3
constructor()
in transcribe-ui-backend/provisioning/lib/construct/ip-restriction.ts
37 1 3
header: transVocabularies()
in transcribe-ui-frontend/frontend/src/components/VocabularyList.tsx
34 1 1
constructor()
in transcribe-ui-backend/provisioning/lib/construct/batch.ts
34 1 3
content: transVocabularies()
in transcribe-ui-frontend/frontend/src/components/VocabularyList.tsx
28 1 1
constructor()
in transcribe-ui-backend/provisioning/lib/construct/database.ts
24 1 2
constructor()
in transcribe-ui-backend/provisioning/lib/construct/storage.ts
23 1 2
header: transVocabularies()
in transcribe-ui-frontend/frontend/src/components/VocabularyAdd.tsx
20 1 1
content: transVocabularies()
in transcribe-ui-frontend/frontend/src/components/VocabularyAdd.tsx
19 1 1
constructor()
in transcribe-ui-backend/provisioning/lib/stack/backend.ts
18 1 3
constructor()
in transcribe-ui-backend/provisioning/lib/construct/lambda-function.ts
15 1 3
complete: async()
in transcribe-ui-frontend/frontend/src/components/Dictation.tsx
13 1 0
applyApi()
in transcribe-ui-backend/provisioning/lib/construct/ip-restriction.ts
10 1 1
id: uuidv4()
in transcribe-ui-frontend/frontend/src/App.tsx
9 1 0
await getVocabularies()
in transcribe-ui-frontend/frontend/src/components/VocabularyList.tsx
9 1 0
text: transCommon()
in transcribe-ui-frontend/frontend/src/App.tsx
8 1 1