aws-samples / chime-voiceconnector-agent-assist
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 53 units with 1,173 lines of code in units (37.8% of code).
    • 1 very long units (205 lines of code)
    • 1 long units (90 lines of code)
    • 21 medium size units (612 lines of code)
    • 8 small units (125 lines of code)
    • 22 very small units (141 lines of code)
17% | 7% | 52% | 10% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js18% | 8% | 52% | 11% | 9%
py0% | 0% | 52% | 0% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/search76% | 0% | 8% | 4% | 10%
src/agentAssist0% | 60% | 16% | 16% | 7%
src/utils0% | 0% | 78% | 14% | 6%
infrastructure/function0% | 0% | 74% | 6% | 19%
amplify/backend0% | 0% | 73% | 26% | 0%
src/apps0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in src/search/StreamingRecord.js
205 17 0
render()
in src/agentAssist/AgentAssist.js
90 11 0
export function queryTranscriptKeyword()
in src/utils/elasticsearch.js
39 3 1
function queryMetadataForKeyword()
in src/utils/elasticsearch.js
38 3 1
def lambda_handler()
in infrastructure/function/src/retrieveMergedAudioUrl/lambda_function.py
38 6 2
export function retrieveBucketAndKey()
in src/utils/elasticsearch.js
37 3 1
35 3 4
function searchDocumentToES()
in infrastructure/function/src/searchLambdaFunction/index.js
35 2 5
export function mergeTranscript()
in src/utils/transcript.js
33 8 1
async function announce()
in amplify/backend/function/chimevcagentassist76fdc921/src/index.js
31 1 1
export function queryCall()
in src/utils/elasticsearch.js
29 4 1
function postDocumentToES()
in infrastructure/function/src/s3AudioStreamingLambdaFunction/index.js
29 1 3
function registerValidSW()
in src/utils/serviceWorker.js
27 5 2
27 2 1
function postDocumentToES()
in infrastructure/function/src/transcriptToESFunction/index.js
27 1 3
function postDocumentToES()
in infrastructure/function/src/metadataStreamingLambdaFunction/index.js
27 1 4
24 2 1
async componentDidMount()
in src/agentAssist/AgentAssist.js
24 1 0
render()
in src/search/HistorySearch.js
23 1 0
function mergeTranscript()
in infrastructure/function/src/transcriptToESFunction/index.js
23 5 1