aws-samples / aws-iot-edukit-tutorials
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 46 units with 848 lines of code in units (9.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (204 lines of code)
    • 6 simple units (260 lines of code)
    • 36 very simple units (384 lines of code)
0% | 0% | 24% | 30% | 45%
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% | 24% | 30% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
workshop/static/en/api-reference/search0% | 0% | 30% | 29% | 40%
workshop/static/en/api-reference0% | 0% | 0% | 36% | 63%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
this.Nav = function()
in workshop/static/en/api-reference/search/search.js
76 22 2
this.FindChildElement = function()
in workshop/static/en/api-reference/search/search.js
32 13 1
this.OnSearchFieldChange = function()
in workshop/static/en/api-reference/search/search.js
55 11 1
this.NavChild = function()
in workshop/static/en/api-reference/search/search.js
41 11 3
this.OnSearchSelectKey = function()
in workshop/static/en/api-reference/search/search.js
21 8 1
this.Search = function()
in workshop/static/en/api-reference/search/search.js
47 7 1
function initMenu()
in workshop/static/en/api-reference/menu.js
65 6 5
this.Search = function()
in workshop/static/en/api-reference/search/search.js
49 6 0
this.ProcessKeys = function()
in workshop/static/en/api-reference/search/search.js
22 6 1
function createResults()
in workshop/static/en/api-reference/search/search.js
56 6 0
function SearchBox()
in workshop/static/en/api-reference/search/search.js
17 5 4
this.Activate = function()
in workshop/static/en/api-reference/search/search.js
23 5 1
this.NavNext = function()
in workshop/static/en/api-reference/search/search.js
20 5 1
this.NavPrev = function()
in workshop/static/en/api-reference/search/search.js
20 5 1
function convertToId()
in workshop/static/en/api-reference/search/search.js
22 4 1
function getXPos()
in workshop/static/en/api-reference/search/search.js
13 4 1
function getYPos()
in workshop/static/en/api-reference/search/search.js
13 4 1
this.SelectItemSet = function()
in workshop/static/en/api-reference/search/search.js
22 4 1
function makeTree()
in workshop/static/en/api-reference/menu.js
13 3 2
function resetState()
in workshop/static/en/api-reference/menu.js
18 3 0