awslabs / aws-bootstrap-kit
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 40 units with 1,160 lines of code in units (72.5% 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)
    • 4 simple units (142 lines of code)
    • 36 very simple units (1,018 lines of code)
0% | 0% | 0% | 12% | 87%
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% | 12% | 87%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/aws-bootstrap-kit/lib/dns0% | 0% | 0% | 29% | 70%
source/aws-bootstrap-kit/lib/account-handler0% | 0% | 0% | 57% | 42%
source/aws-bootstrap-kit/lib0% | 0% | 0% | 4% | 95%
source/aws-bootstrap-kit/lib/validate-email-handler0% | 0% | 0% | 0% | 100%
cicd/lib0% | 0% | 0% | 0% | 100%
integTests/validateEmailTest/lib0% | 0% | 0% | 0% | 100%
source/aws-bootstrap-kit0% | 0% | 0% | 0% | 100%
integTests/secureRootUserTest/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export async function isCompleteHandler()
in source/aws-bootstrap-kit/lib/account-handler/index.ts
40 8 1
private createOrganizationTree()
in source/aws-bootstrap-kit/lib/aws-organizations-stack.ts
38 6 3
export async function onEventHandler()
in source/aws-bootstrap-kit/lib/dns/delegation-record-handler/index.ts
42 6 1
async function resolveRoleArn()
in source/aws-bootstrap-kit/lib/dns/delegation-record-handler/index.ts
22 6 2
constructor()
in source/aws-bootstrap-kit/lib/aws-organizations-stack.ts
31 5 3
export async function onEventHandler()
in source/aws-bootstrap-kit/lib/account-handler/index.ts
30 5 1
constructor()
in source/aws-bootstrap-kit/lib/dns.ts
34 5 3
export async function isCompleteHandler()
in source/aws-bootstrap-kit/lib/validate-email-handler/index.ts
24 4 1
constructor()
in source/aws-bootstrap-kit/lib/account.ts
97 4 3
export async function onEventHandler()
in source/aws-bootstrap-kit/lib/validate-email-handler/index.ts
15 3 1
constructor()
in source/aws-bootstrap-kit/lib/dns/cross-account-zone-delegation-record.ts
24 3 3
public static getOrCreate()
in source/aws-bootstrap-kit/lib/account-provider.ts
5 2 1
async function changeRecord()
in source/aws-bootstrap-kit/lib/dns/delegation-record-handler/index.ts
37 2 1
constructor()
in source/aws-bootstrap-kit/lib/dns/cross-account-zone-delegation-record-provider.ts
26 2 3
constructor()
in source/aws-bootstrap-kit/lib/organization-trail.ts
146 2 3
constructor()
in source/aws-bootstrap-kit/lib/validate-email.ts
16 2 3
public static getOrCreate()
in source/aws-bootstrap-kit/lib/validate-email-provider.ts
8 2 2
constructor()
in source/aws-bootstrap-kit/lib/validate-email-provider.ts
35 2 3
constructor()
in integTests/secureRootUserTest/lib/secure_root_user_test-stack.ts
4 1 3
constructor()
in integTests/validateEmailTest/lib/validate_email_test-stack.ts
11 1 3