aws-solutions / distributed-load-testing-on-aws
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 72 units with 2,826 lines of code in units (50.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (576 lines of code)
    • 5 simple units (262 lines of code)
    • 64 very simple units (1,988 lines of code)
0% | 0% | 20% | 9% | 70%
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
js0% | 0% | 42% | 19% | 38%
ts0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/console/src0% | 0% | 40% | 20% | 38%
source/results-parser/lib0% | 0% | 81% | 0% | 18%
source/infrastructure/lib0% | 0% | 0% | 0% | 100%
deployment/ecr/distributed-load-testing-on-aws-load-tester0% | 0% | 0% | 0% | 100%
source/api-services/lib0% | 0% | 0% | 0% | 100%
source/task-status-checker0% | 0% | 0% | 0% | 100%
source/custom-resource/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in source/console/src/Components/Create/Create.js
87 13 1
function results()
in source/results-parser/lib/parser/index.js
57 13 2
render()
in source/console/src/Components/Create/Create.js
432 12 0
function registerValidSW()
in source/console/src/serviceWorker.js
33 8 2
caculateBandwidth()
in source/console/src/Components/Results/Results.js
24 8 2
showResult()
in source/console/src/Components/Results/Results.js
112 7 2
render()
in source/console/src/Components/Results/Results.js
21 7 0
render()
in source/console/src/Components/Running/Running.js
72 7 0
export function register()
in source/console/src/serviceWorker.js
22 5 1
def messaging()
in deployment/ecr/distributed-load-testing-on-aws-load-tester/ecslistener.py
9 5 1
function checkValidServiceWorker()
in source/console/src/serviceWorker.js
23 4 2
handleInputChange()
in source/console/src/Components/Create/Create.js
10 4 1
handleFileChange()
in source/console/src/Components/Create/Create.js
21 4 1
render()
in source/console/src/Components/Dashboard/Dashboard.js
48 4 0
setTestData()
in source/console/src/Components/Details/Details.js
14 3 1
async handleStart()
in source/console/src/Components/Details/Details.js
48 3 0
async handleDownload()
in source/console/src/Components/Details/Details.js
11 3 0
TimeStamp: moment()
in source/api-services/lib/metrics/index.js
8 3 0
TimeStamp: moment()
in source/results-parser/lib/metrics/index.js
9 3 0
async function listTasks()
in source/task-status-checker/index.js
11 2 1