aws-solutions / aws-limit-monitor
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 77 units with 2,090 lines of code in units (80.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (117 lines of code)
    • 1 simple units (76 lines of code)
    • 75 very simple units (1,897 lines of code)
0% | 0% | 5% | 3% | 90%
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% | 9% | 6% | 84%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/lambda/services/customhelper0% | 0% | 31% | 0% | 68%
source/lambda/services/slacknotify0% | 0% | 0% | 40% | 59%
source/lib0% | 0% | 0% | 0% | 100%
source/lambda/services/servicequotaschecks0% | 0% | 0% | 0% | 100%
source/lambda/services/limitreport0% | 0% | 0% | 0% | 100%
source/lambda/services/tarefresh0% | 0% | 0% | 0% | 100%
source/lambda/resources/event-injector0% | 0% | 0% | 0% | 100%
source/lambda/resources/logger0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
const respond = function()
in source/lambda/services/customhelper/lib/index.js
117 18 3
slackMessageBuilder()
in source/lambda/services/slacknotify/lib/slack-notify.js
76 7 1
constructor()
in source/lib/limit-monitor-stack.ts
557 5 3
async getEC2InstanceTypes()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
33 5 0
async performLimitCheck()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
35 5 5
async static putEvent()
in source/lambda/resources/event-injector/event-injector.common.js
21 4 0
async getRegionsForServiceQuotas()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
36 4 0
async getServiceLimits()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
28 4 3
async getServiceUsage()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
20 4 3
sendMetrics()
in source/lambda/services/limitreport/lib/limit-report.js
37 3 2
async checkVCPUOptIn()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
19 3 0
async checkForVCPULimits()
in source/lambda/services/servicequotaschecks/lib/service-quotas-checks.js
12 3 0
async getUpdatedEC2Checks()
in source/lambda/services/tarefresh/lib/ta-refresh.js
14 3 0
function()
in source/lambda/services/slacknotify/lib/slack-notify.js
12 3 2
processEvent()
in source/lambda/services/slacknotify/lib/slack-notify.js
22 3 3
constructor()
in source/lib/limit-monitor-spoke-stack.ts
291 2 3
static log()
in source/lambda/resources/logger/logger.common.js
11 2 2
log()
in source/lambda/services/customhelper/lib/logger.js
4 2 2
let sendMetrics = function()
in source/lambda/services/customhelper/lib/index.js
23 2 3
async function createSSMParameter()
in source/lambda/services/customhelper/lib/index.js
50 2 3