aws-samples / ab-testing-at-edge
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 48 units with 778 lines of code in units (29.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)
    • 0 simple units (0 lines of code)
    • 48 very simple units (778 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 0% | 0% | 100%
lib/module_20% | 0% | 0% | 0% | 100%
lib/module_3_10% | 0% | 0% | 0% | 100%
lib/module_3_30% | 0% | 0% | 0% | 100%
lib/module_3_20% | 0% | 0% | 0% | 100%
resources/module_3_10% | 0% | 0% | 0% | 100%
lib/module_10% | 0% | 0% | 0% | 100%
resources/module_3_20% | 0% | 0% | 0% | 100%
lib/bootstrap0% | 0% | 0% | 0% | 100%
resources/module_3_30% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function handler()
in lib/module_2/ab_testing_module_2.ts
22 4 1
async function fetchConfigFromDynamoDB()
in resources/module_3_3/request/index.js
12 4 1
function handler()
in lib/module_1/ab_testing_module_1.ts
10 3 1
async function fetchConfigFromSSM()
in resources/module_3_1/request/index.js
15 3 0
function handler()
in lib/module_2/ab_testing_module_2.ts
16 2 1
async function getConfigFromS3()
in resources/module_3_1/request/index.js
13 2 0
function fetchConfigFromS3()
in resources/module_3_1/request/index.js
9 2 0
const setCookie = function()
in resources/module_3_1/request/index.js
5 2 2
const setCookie = function()
in resources/module_3_1/response/index.js
8 2 2
function fetchConfigFromCF()
in resources/module_3_2/request/index.js
9 2 1
const setCookie = function()
in resources/module_3_2/request/index.js
5 2 2
const setCookie = function()
in resources/module_3_2/response/index.js
8 2 2
const setCookie = function()
in resources/module_3_3/request/index.js
5 2 2
const setCookie = function()
in resources/module_3_3/response/index.js
8 2 2
constructor()
in lib/ab_dashboard.ts
3 1 2
private createLEVersionsWidget()
in lib/ab_dashboard.ts
16 1 3
private createCFFVersionsWidget()
in lib/ab_dashboard.ts
15 1 2
private createLEUsersWidget()
in lib/ab_dashboard.ts
16 1 3
private createCFFUsersWidget()
in lib/ab_dashboard.ts
15 1 2
11 1 3