aws-samples / chime-voiceconnector-agent-assist
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 53 units with 1,173 lines of code in units (37.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (295 lines of code)
    • 3 simple units (91 lines of code)
    • 48 very simple units (787 lines of code)
0% | 0% | 25% | 7% | 67%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
js0% | 0% | 26% | 4% | 68%
py0% | 0% | 0% | 52% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/search0% | 0% | 76% | 0% | 23%
src/agentAssist0% | 0% | 60% | 0% | 40%
src/utils0% | 0% | 0% | 13% | 86%
infrastructure/function0% | 0% | 0% | 12% | 87%
amplify/backend0% | 0% | 0% | 0% | 100%
src/apps0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex 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 mergeTranscript()
in src/utils/transcript.js
33 8 1
function showSentiment()
in src/utils/transcript.js
20 6 4
def lambda_handler()
in infrastructure/function/src/retrieveMergedAudioUrl/lambda_function.py
38 6 2
export function register()
in src/utils/serviceWorker.js
22 5 1
function registerValidSW()
in src/utils/serviceWorker.js
27 5 2
function showKeyphrases()
in src/utils/transcript.js
19 5 4
function mergeTranscript()
in infrastructure/function/src/transcriptToESFunction/index.js
23 5 1
export function queryCall()
in src/utils/elasticsearch.js
29 4 1
componentDidUpdate()
in src/search/HistorySearch.js
11 3 2
function checkValidServiceWorker()
in src/utils/serviceWorker.js
20 3 2
export function retrieveBucketAndKey()
in src/utils/elasticsearch.js
37 3 1
function queryMetadataForKeyword()
in src/utils/elasticsearch.js
38 3 1
export function queryTranscriptKeyword()
in src/utils/elasticsearch.js
39 3 1
35 3 4
def upload_file()
in infrastructure/function/src/retrieveMergedAudioUrl/lambda_function.py
9 3 3
exports.handler = function()
in infrastructure/function/src/metadataStreamingLambdaFunction/index.js
19 3 2
function waitOnComplete()
in amplify/backend/function/chimevcagentassist76fdc921/src/index.js
11 2 2
export function unregister()
in src/utils/serviceWorker.js
7 2 0