aws-samples / medical-transcription-analysis
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 192 units with 3,700 lines of code in units (23.6% of code).
    • 4 very long units (1,407 lines of code)
    • 6 long units (441 lines of code)
    • 23 medium size units (725 lines of code)
    • 41 small units (581 lines of code)
    • 118 very small units (546 lines of code)
38% | 11% | 19% | 15% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js41% | 17% | 20% | 12% | 8%
ts86% | 0% | 11% | 2% | 0%
py0% | 0% | 22% | 34% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src69% | 8% | 9% | 11% | 1%
lib86% | 0% | 11% | 2% | 0%
src/components0% | 39% | 43% | 9% | 7%
src/utils0% | 39% | 14% | 0% | 46%
lambda0% | 0% | 19% | 35% | 44%
src/audio-utils0% | 0% | 33% | 34% | 32%
lambda/custom_resource_athena0% | 0% | 31% | 13% | 54%
lambda/create_session0% | 0% | 58% | 26% | 14%
lambda/get_credentials0% | 0% | 92% | 0% | 7%
lambda/list_sessions0% | 0% | 0% | 82% | 17%
lambda/get_transcription_translation0% | 0% | 0% | 90% | 9%
lambda/get_session_data0% | 0% | 0% | 81% | 18%
lambda/create_health_care_professional0% | 0% | 0% | 61% | 38%
lambda/create_patient0% | 0% | 0% | 0% | 100%
lambda/list_patients0% | 0% | 0% | 0% | 100%
lambda/list_health_care_professionals0% | 0% | 0% | 0% | 100%
src/libs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
748 49 0
constructor()
in app/lib/medical-transcription-analysis-stack.ts
345 1 3
196 4 0
118 11 0
function ResultRow()
in app/src/components/AnalysisPane.js
93 19 6
function ResultTable()
in app/src/components/AnalysisPane.js
88 2 9
73 1 0
export default function generateSOAPSummary()
in app/src/utils/soapSummary.js
70 17 1
export default function ExportPane()
in app/src/components/ExportPane.js
65 4 5
export default function useComprehension()
in app/src/useComprehension.js
52 9 2
export default function MicrophoneIcon()
in app/src/components/MicrophoneIcon.js
46 7 4
function addCorsOptionsAndMethods()
in app/lib/medical-transcription-analysis-stack.ts
45 1 2
export default function TranscriptLine()
in app/src/components/TranscriptLine.js
43 4 7
export default function FormInput()
in app/src/components/FormInput/FormInput.js
41 9 7
def c()
in app/lambda/testAthena.py
41 1 0
export default function createPCMStream()
in app/src/audio-utils/createPCMStream.js
40 5 2
export default function Loading()
in app/src/components/Loading/Loading.js
36 1 6
function registerValidSW()
in app/src/serviceWorker.js
33 8 2
function useAudioStream()
in app/src/home.js
33 7 2
export default function AnalysisPane()
in app/src/components/AnalysisPane.js
29 1 9