aws-samples / distributed-load-testing-on-aws-cn
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 41 units with 1,235 lines of code in units (28.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (538 lines of code)
    • 5 simple units (270 lines of code)
    • 33 very simple units (427 lines of code)
0% | 0% | 43% | 21% | 34%
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% | 43% | 21% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/console/src0% | 0% | 42% | 23% | 34%
source/results-parser/lib0% | 0% | 86% | 0% | 13%
source/task-status-checker0% | 0% | 0% | 0% | 100%
source/api-services/lib0% | 0% | 0% | 0% | 100%
source/custom-resource/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
render()
in source/console/src/Components/Details/Details.js
177 18 0
render()
in source/console/src/Components/Create/Create.js
304 14 0
function results()
in source/results-parser/lib/parser/index.js
57 13 2
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
120 7 3
render()
in source/console/src/Components/Results/Results.js
21 7 0
constructor()
in source/console/src/Components/Create/Create.js
72 7 1
export function register()
in source/console/src/serviceWorker.js
22 5 1
function checkValidServiceWorker()
in source/console/src/serviceWorker.js
23 4 2
handleFileChange()
in source/console/src/Components/Create/Create.js
21 4 1
render()
in source/console/src/Components/History/History.js
48 3 0
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
export function unregister()
in source/console/src/serviceWorker.js
7 2 0
toggleTab()
in source/console/src/Components/Results/Results.js
5 2 1
parseJson()
in source/console/src/Components/Create/Create.js
7 2 1