aws-solutions / aws-qnabot
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 461 units with 8,650 lines of code in units (35.2% of code).
    • 1 very complex units (250 lines of code)
    • 1 complex units (58 lines of code)
    • 16 medium complex units (1,234 lines of code)
    • 40 simple units (1,307 lines of code)
    • 403 very simple units (5,801 lines of code)
2% | <1% | 14% | 15% | 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
js3% | <1% | 15% | 15% | 65%
py0% | 0% | 8% | 14% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda/es-proxy-layer15% | 0% | 14% | 24% | 45%
lambda/fulfillment0% | 3% | 21% | 20% | 54%
lambda/cfn0% | 0% | 20% | 10% | 69%
lambda/import0% | 0% | 100% | 0% | 0%
lambda/export0% | 0% | 24% | 7% | 68%
utility_scripts/csv2json_converter0% | 0% | 54% | 16% | 29%
utility_scripts0% | 0% | 42% | 0% | 57%
templates/master0% | 0% | 0% | 9% | 90%
lambda/testall0% | 0% | 0% | 35% | 64%
lambda/qnabot-common-layer0% | 0% | 0% | 31% | 68%
lambda/kendra-webcrawler-schedule-updater0% | 0% | 0% | 52% | 47%
lambda/lexv2-build0% | 0% | 0% | 6% | 93%
lambda/kendra-webcrawler0% | 0% | 0% | 24% | 75%
lambda/kendra-webcrawler-status0% | 0% | 0% | 48% | 51%
lambda/lex-build0% | 0% | 0% | 7% | 92%
website/js0% | 0% | 0% | 30% | 69%
templates0% | 0% | 0% | 0% | 100%
lambda/js_lambda_hook_sdk0% | 0% | 0% | 0% | 100%
templates/dev0% | 0% | 0% | 0% | 100%
lambda/connect0% | 0% | 0% | 0% | 100%
templates/lib0% | 0% | 0% | 0% | 100%
lambda/genesys0% | 0% | 0% | 0% | 100%
lambda/proxy-es0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function routeKendraRequest()
in lambda/es-proxy-layer/lib/kendra.js
250 56 2
async function handleRequest()
in lambda/fulfillment/lib/middleware/lexRouter.js
58 28 4
function update_res_with_hit()
in lambda/es-proxy-layer/lib/query.js
90 22 3
async function processResponse()
in lambda/fulfillment/lib/middleware/specialtyBotRouter.js
69 21 4
String.prototype.csvToArray = function()
in utility_scripts/csv2json_converter/js/csvToArray.v2.1.js
64 20 1
async function createFAQ()
in lambda/export/createFAQ.js
113 18 1
async function get_hit()
in lambda/es-proxy-layer/lib/query.js
101 18 2
async function processResponse()
in lambda/fulfillment/lib/middleware/lexRouter.js
86 18 4
Update()
in lambda/cfn/lib/lex.js
133 17 4
function convertToQnABotJSON()
in utility_scripts/csv2json_converter/js/qnabot_csv2json_converter.js
44 16 1
def process_stacks()
in utility_scripts/configureCMK.py
88 16 1
exports.step=function()
in lambda/import/index.js
134 15 3
await asyncForEach()
in lambda/es-proxy-layer/lib/kendraQuery.js
38 14 2
function set_userLocale()
in lambda/fulfillment/lib/middleware/multilanguage.js
42 13 4
async function set_translated_transcript()
in lambda/fulfillment/lib/middleware/multilanguage.js
26 12 2
Create()
in lambda/cfn/lib/lex.js
109 11 2
async function connect_response()
in lambda/fulfillment/lib/middleware/5_assemble.js
45 11 2
async function get_userInfo()
in lambda/fulfillment/lib/middleware/2_preprocess.js
52 11 3
function get_keywords_from_comprehend()
in lambda/es-proxy-layer/lib/keywords.js
40 10 1
function getClientType()
in lambda/fulfillment/lib/middleware/1_parse.js
21 10 1