aws-solutions / operations-conductor
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 84 units with 2,966 lines of code in units (33.1% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (598 lines of code)
    • 4 medium complex units (172 lines of code)
    • 16 simple units (953 lines of code)
    • 62 very simple units (1,243 lines of code)
0% | 20% | 5% | 32% | 41%
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
tsx0% | 39% | 0% | 27% | 32%
ts0% | 4% | 10% | 35% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
console/src0% | 39% | 0% | 27% | 32%
services/resource-selector0% | 23% | 8% | 52% | 15%
services/tasks0% | 0% | 15% | 40% | 43%
services/queue-consumer0% | 0% | 18% | 62% | 18%
services/custom-resource0% | 0% | 0% | 32% | 67%
services/users0% | 0% | 0% | 0% | 100%
services/actions0% | 0% | 0% | 0% | 100%
services/metrics0% | 0% | 0% | 0% | 100%
services/common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
render()
in source/console/src/views/AutomationExecutionDetail.tsx
527 38 0
constructor()
in source/services/resource-selector/index.ts
71 27 1
async buildTaskItem()
in source/services/tasks/tasks.ts
97 22 2
async checkParameterValue()
in source/services/tasks/tasks.ts
27 14 1
async function sendMetric()
in source/services/resource-selector/index.ts
26 13 4
async function getNumberOfActiveStepsForAutomationId()
in source/services/queue-consumer/index.ts
22 12 2
render()
in source/console/src/views/TaskDetail.tsx
40 10 0
async getAutomationExecutions()
in source/services/tasks/tasks.ts
61 10 4
async function processMessageFromQueue()
in source/services/queue-consumer/index.ts
35 9 2
async function sendMessagesToResourceQueue()
in source/services/resource-selector/index.ts
59 8 3
async createTask()
in source/services/tasks/tasks.ts
53 8 1
async getTaskExecutions()
in source/services/tasks/tasks.ts
44 8 4
async function getMaxNumberOfMessagesToReadFromQueue()
in source/services/queue-consumer/index.ts
38 8 0
constructor()
in source/console/src/views/TaskCreate.tsx
142 7 1
async function verifyTagExistsOnResources()
in source/services/resource-selector/index.ts
47 7 1
async putCloudWatchEventRule()
in source/services/tasks/tasks.ts
61 7 1
render()
in source/console/src/views/TaskCreate.tsx
81 6 0
render()
in source/console/src/views/Actions.tsx
105 6 0
async function getResourcesForTagName()
in source/services/resource-selector/index.ts
48 6 1
async getAutomationExecution()
in source/services/tasks/tasks.ts
50 6 3