aws-solutions / machine-to-cloud-connectivity-framework
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 204 units with 4,701 lines of code in units (72.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (566 lines of code)
    • 22 simple units (898 lines of code)
    • 173 very simple units (3,237 lines of code)
0% | 0% | 12% | 19% | 68%
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% | 0% | 62% | 10% | 26%
py0% | 0% | 13% | 4% | 82%
ts0% | 0% | 1% | 24% | 73%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ui/src0% | 0% | 50% | 24% | 25%
machine_connector/m2c2_opcda_connector0% | 0% | 31% | 0% | 68%
lambda/lib0% | 0% | 2% | 35% | 62%
lambda/greengrass-deployer0% | 0% | 0% | 67% | 32%
lambda/connection-builder0% | 0% | 0% | 76% | 23%
machine_connector/m2c2_publisher0% | 0% | 0% | 10% | 89%
infrastructure/lib0% | 0% | 0% | 0% | 100%
lambda/custom-resource0% | 0% | 0% | 0% | 100%
machine_connector/utils0% | 0% | 0% | 0% | 100%
infrastructure/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function ConnectionForm()
in source/ui/src/views/ConnectionForm.tsx
173 16 0
async function handleConnection()
in source/ui/src/views/ConnectionForm.tsx
69 15 1
def job_execution()
in source/machine_connector/m2c2_opcda_connector/m2c2_opcda_connector.py
49 14 3
export default function ConnectionLogsModal()
in source/ui/src/views/ConnectionLogsModal.tsx
69 12 1
function validateOpcDa()
in source/ui/src/util/Utils.ts
19 12 2
function validateAllTags()
in source/lambda/lib/validations.ts
34 12 2
def validate_schema()
in source/machine_connector/m2c2_opcda_connector/validations/message_validation.py
27 11 2
def function_handler()
in source/machine_connector/m2c2_opcda_connector/m2c2_opcda_connector.py
35 11 2
export default function Dashboard()
in source/ui/src/views/Dashboard.tsx
91 11 1
function validateOpcUa()
in source/ui/src/util/Utils.ts
16 10 2
function validateOpcUaConnectionDefinition()
in source/lambda/lib/validations.ts
27 10 1
async function deployConnection()
in source/lambda/greengrass-deployer/index.ts
101 10 1
function handleValueChange()
in source/ui/src/views/ConnectionForm.tsx
33 9 1
public async updateGreengrassGroupDefinitions()
in source/lambda/lib/greengrass-handler.ts
43 9 1
public async deleteConnectionFromGreengrassDefinitions()
in source/lambda/lib/greengrass-handler.ts
63 9 1
async function handleConnectionControl()
in source/lambda/connection-builder/index.ts
31 9 1
async function processConnection()
in source/lambda/connection-builder/index.ts
56 9 1
async function controlConnection()
in source/ui/src/views/Dashboard.tsx
37 8 3
export function copyObject()
in source/ui/src/util/Utils.ts
21 7 1
30 7 1