cdklabs / decdk
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 62 units with 894 lines of code in units (94.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (84 lines of code)
    • 2 medium complex units (83 lines of code)
    • 15 simple units (370 lines of code)
    • 44 very simple units (357 lines of code)
0% | 9% | 9% | 41% | 39%
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% | 9% | 9% | 41% | 39%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 9% | 9% | 41% | 39%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function deserializeValue()
in src/declarative-stack.ts
84 28 5
42 11 2
41 11 2
36 10 2
function methodSchema()
in src/jsii2schema.ts
40 10 2
function invokeMethod()
in src/declarative-stack.ts
27 10 3
function deconstructType()
in src/declarative-stack.ts
31 9 3
26 8 2
export function isConstruct()
in src/jsii2schema.ts
30 8 1
function deconstructStaticMethod()
in src/declarative-stack.ts
19 8 3
33 7 2
function isSerializableType()
in src/jsii2schema.ts
21 7 2
function process()
in src/declarative-stack.ts
16 7 1
function printWarnings()
in src/cdk-schema.ts
18 6 2
18 6 2
12 6 2
constructor()
in src/declarative-stack.ts
31 6 3
function deconstructEnumLike()
in src/declarative-stack.ts
12 6 3
function unpackConstruct()
in src/cdk-schema.ts
10 5 1
private constructor()
in src/jsii2schema.ts
15 5 3