aws-samples / cdk-neptune-knowledge-graph
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 96 units with 1,689 lines of code in units (59.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (243 lines of code)
    • 14 simple units (409 lines of code)
    • 78 very simple units (1,037 lines of code)
0% | 0% | 14% | 24% | 61%
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% | 14% | 24% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
web/js0% | 0% | 19% | 24% | 56%
lambda0% | 0% | 0% | 36% | 63%
lib0% | 0% | 0% | 16% | 83%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function move()
in web/js/input.js
62 21 2
async function viewNode()
in web/js/node-view.js
90 17 2
42 15 3
49 12 2
async function init()
in web/js/main.js
42 10 0
function down()
in web/js/input.js
28 10 2
async function deleteNode()
in web/js/node-view.js
30 9 2
28 9 3
function viewGrid()
in web/js/main.js
42 9 1
async function verify()
in lambda/jwt-get.js
50 9 1
async function viewEdge()
in web/js/edge-view.js
38 8 2
function locateNodes()
in web/js/render.js
21 7 2
function RGB2HSV()
in web/js/complement.js
15 7 1
addLambda()
in lib/api-construct.js
44 6 3
await focusOn()
in web/js/find.js
21 6 4
async function up()
in web/js/input.js
17 6 2
await viewNode()
in web/js/input.js
17 6 2
await viewEdge()
in web/js/input.js
16 6 2
async function addAuthHeader()
in web/js/rest-api.js
26 5 1
async function dblclick()
in web/js/input.js
14 5 2