aws-solutions / aws-centralized-logging
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 23 units with 1,512 lines of code in units (72.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (33 lines of code)
    • 22 very simple units (1,479 lines of code)
0% | 0% | 0% | 2% | 97%
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
ts0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
services/transformer0% | 0% | 0% | 24% | 75%
resources/lib0% | 0% | 0% | 0% | 100%
services/helper0% | 0% | 0% | 0% | 100%
services/@aws-solutions/utils/metrics0% | 0% | 0% | 0% | 100%
services/@aws-solutions/utils/logger0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function buildSource()
in source/services/transformer/index.ts
33 7 2
async function areRegionsValid()
in source/services/helper/index.ts
22 5 2
function transform()
in source/services/transformer/index.ts
22 5 4
export function applyCfnNagSuppressRules()
in source/resources/lib/utils.ts
23 4 2
async function putDestination()
in source/services/helper/index.ts
75 4 6
export function applyRetentionPolicy()
in source/resources/lib/utils.ts
7 3 1
export function applyDependsOn()
in source/resources/lib/utils.ts
10 3 2
async function getRegions()
in source/services/helper/index.ts
28 3 0
function extractJson()
in source/services/transformer/index.ts
6 3 1
async function putRecords()
in source/services/transformer/index.ts
42 3 1
public visit()
in source/resources/lib/resource-retention-aspect.ts
5 2 1
constructor()
in source/resources/lib/cl-demo-stack.ts
155 2 3
constructor()
in source/resources/lib/cl-primary-stack.ts
854 2 2
await putDestination()
in source/services/helper/index.ts
11 2 6
function isValidJson()
in source/services/transformer/index.ts
8 2 1
function isNumeric()
in source/services/transformer/index.ts
3 2 1
constructor()
in source/resources/lib/cl-jumpbox-construct.ts
27 1 3
constructor()
in source/resources/lib/cl-demo-ec2-construct.ts
98 1 3
format: combine()
in source/services/@aws-solutions/utils/logger/index.ts
9 1 1
static async sendAnonymousMetric()
in source/services/@aws-solutions/utils/metrics/index.ts
8 1 0