cdklabs / aws-delivlib
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 188 units with 2,524 lines of code in units (70.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (76 lines of code)
    • 16 simple units (513 lines of code)
    • 171 very simple units (1,935 lines of code)
0% | 0% | 3% | 20% | 76%
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% | 3% | 21% | 75%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/pull-request0% | 0% | 35% | 6% | 57%
lib0% | 0% | 0% | 25% | 74%
lib/registry-sync0% | 0% | 0% | 48% | 51%
lib/custom-resource-handlers0% | 0% | 0% | 16% | 83%
lib/code-signing0% | 0% | 0% | 16% | 83%
lib/chime-notifier0% | 0% | 0% | 35% | 64%
lib/change-control-lambda0% | 0% | 0% | 0% | 100%
lib/pipeline-watcher0% | 0% | 0% | 0% | 100%
lib/publishing0% | 0% | 0% | 0% | 100%
lib/pipeline-notifications0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in lib/pull-request/pr.ts
76 14 3
constructor()
in lib/shellable.ts
61 10 3
export async function handler()
in lib/chime-notifier/handler/notifier-handler.ts
29 9 1
async function handleEvent()
in lib/custom-resource-handlers/src/pgp-secret.ts
36 9 2
export function validateProperties()
in lib/custom-resource-handlers/src/_cloud-formation.ts
15 8 2
constructor()
in lib/pipeline.ts
50 8 3
private createHead()
in lib/pull-request/pr.ts
7 8 0
constructor()
in lib/publishing.ts
36 8 3
constructor()
in lib/change-controller.ts
55 7 3
function mergeArtifacts()
in lib/build-spec.ts
13 7 2
private renderArtifacts()
in lib/build-spec.ts
12 7 1
constructor()
in lib/registry-sync/ecr-mirror.ts
86 7 3
environment: noUndefined()
in lib/publishing.ts
11 7 8
constructor()
in lib/code-signing/code-signing-certificate.ts
35 6 3
constructor()
in lib/auto-build.ts
26 6 3
private cloneIfNeeded()
in lib/pull-request/pr.ts
7 6 0
public prebuildCommands()
in lib/shellable.ts
34 6 2
async function handleEvent()
in lib/custom-resource-handlers/src/certificate-signing-request.ts
23 5 2
async function handleEvent()
in lib/custom-resource-handlers/src/private-key.ts
18 5 2
resourceVersion: hashFileOrDirectory()
in lib/code-signing/private-key.ts
11 5 1