cdklabs / awscdk-change-analyzer
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 376 units with 3,846 lines of code in units (51.1% 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)
    • 22 simple units (573 lines of code)
    • 354 very simple units (3,273 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 14% | 85%
tsx0% | 0% | 0% | 20% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/@aws-c2a/engine0% | 0% | 0% | 21% | 78%
packages/aws-c2a/lib0% | 0% | 0% | 29% | 70%
packages/@aws-c2a/web-app0% | 0% | 0% | 23% | 76%
packages/@aws-c2a/models0% | 0% | 0% | 0% | 100%
packages/@aws-c2a/cdk-pipelines-step0% | 0% | 0% | 0% | 100%
packages/@aws-c2a/presets0% | 0% | 0% | 0% | 100%
packages/@aws-c2a/rules0% | 0% | 0% | 0% | 100%
packages/@aws-c2a/visualizer0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public processMetadataMessages()
in packages/aws-c2a/lib/cloud-assembly.ts
27 10 1
export default function ApproveChangeBtn()
in packages/@aws-c2a/web-app/src/reusable-components/ApproveChangeBtn.tsx
23 10 1
private navigateToPath()
in packages/@aws-c2a/engine/lib/rules/rule-processor.ts
24 10 2
function propagatePropertyOperation()
in packages/@aws-c2a/engine/lib/model-diffing/change-propagator.ts
31 10 2
export default function ChangeDetailsPane()
in packages/@aws-c2a/web-app/src/AggregationsView/ChangeDetailsPane/ChangeDetailsPane.tsx
65 9 1
public create()
in packages/@aws-c2a/engine/lib/model-diffing/property-diff.ts
17 9 4
export function resolveCfnProperty()
in packages/aws-c2a/lib/private/cfn.ts
46 8 2
function parseComponentCFilter()
in packages/@aws-c2a/engine/lib/rules/rule-parser.ts
20 8 1
private getUpdateTypeFromPropertySpec()
in packages/@aws-c2a/engine/lib/platform-mapping/cloudformation/cf-resource.ts
22 8 3
function findMatchesDecreasingSimilarity()
in packages/@aws-c2a/engine/lib/model-diffing/entity-matchers/entities-matcher.ts
30 8 4
private evaluateReport()
in packages/aws-c2a/lib/toolkit.ts
43 7 2
function includeDownstreamStacks()
in packages/aws-c2a/lib/cloud-assembly.ts
20 7 2
function includeUpstreamStacks()
in packages/aws-c2a/lib/cloud-assembly.ts
22 7 2
function parseSelector()
in packages/@aws-c2a/engine/lib/rules/rule-parser.ts
26 7 1
function parseCondition()
in packages/@aws-c2a/engine/lib/rules/rule-parser.ts
27 7 1
protected getUpdateTypeForPropertyPath()
in packages/@aws-c2a/engine/lib/platform-mapping/cloudformation/cf-resource.ts
12 7 1
private static findAggsIntersections()
in packages/@aws-c2a/engine/lib/aggregations/aggregations-extractor.ts
28 7 1
public async c2aDiff()
in packages/aws-c2a/lib/toolkit.ts
14 6 1
private selectDefaultStacks()
in packages/aws-c2a/lib/cloud-assembly.ts
21 6 3
private buildDiffString()
in packages/@aws-c2a/web-app/src/selectors/diff-stringifier.ts
28 6 3