cdklabs / construct-hub
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 362 units with 5,904 lines of code in units (64.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (555 lines of code)
    • 21 simple units (837 lines of code)
    • 331 very simple units (4,512 lines of code)
0% | 0% | 9% | 14% | 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% | 9% | 14% | 76%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/backend0% | 0% | 12% | 14% | 73%
src/package-sources0% | 0% | 11% | 13% | 75%
src/codeartifact0% | 0% | 24% | 0% | 75%
src/webapp0% | 0% | 0% | 58% | 41%
src0% | 0% | 0% | 8% | 91%
src/s30% | 0% | 0% | 33% | 66%
src/monitoring0% | 0% | 0% | 0% | 100%
src/package-tag0% | 0% | 0% | 0% | 100%
src/monitored-certificate0% | 0% | 0% | 0% | 100%
src/package-tag-group0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src/preload-file0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function handler()
in src/backend/transliterator/transliterator.ecstask.ts
97 19 1
export async function handler()
in src/backend/catalog-builder/catalog-builder.lambda.ts
76 17 2
function getRelevantVersionInfos()
in src/package-sources/npmjs/npm-js-follower.lambda.ts
63 16 5
function detectConstructFrameworkPackage()
in src/backend/ingestion/framework-detection.lambda-shared.ts
31 16 2
for await()
in src/backend/inventory/canary.lambda.ts
57 16 1
private async getDownloadsRaw()
in src/backend/package-stats/npm-downloads.lambda-shared.ts
46 15 3
public constructor()
in src/codeartifact/repository.ts
50 13 3
await metricScope()
in src/package-sources/npmjs/npm-js-follower.lambda.ts
59 11 1
await metricScope()
in src/backend/inventory/canary.lambda.ts
29 11 1
function doRecordPerLanguage()
in src/backend/inventory/canary.lambda.ts
47 11 7
private https()
in src/package-sources/npmjs/couch-changes.lambda-shared.ts
61 10 4
async function appendPackage()
in src/backend/catalog-builder/catalog-builder.lambda.ts
66 9 4
function isConstructFrameworkPackage()
in src/package-sources/npmjs/npm-js-follower.lambda.ts
10 8 1
await metricScope()
in src/package-sources/npmjs/canary/npmjs-package-canary.lambda.ts
35 8 1
await metricScope()
in src/backend/inventory/canary.lambda.ts
40 8 1
export async function handler()
in src/backend/deny-list/prune-handler.lambda.ts
46 8 1
private async init()
in src/backend/deny-list/client.lambda-shared.ts
31 8 0
public constructor()
in src/webapp/index.ts
89 7 3
private createVpc()
in src/construct-hub.ts
79 7 2
get()
in src/s3/vpc-endpoint-bucket.ts
15 7 3