aws-samples / aws-lambda-fanout
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 77 units with 1,218 lines of code in units (84.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (71 lines of code)
    • 2 medium complex units (111 lines of code)
    • 9 simple units (237 lines of code)
    • 65 very simple units (799 lines of code)
0% | 5% | 9% | 19% | 65%
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% | 5% | 9% | 19% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 6% | 5% | 22% | 64%
ROOT0% | 0% | 29% | 0% | 70%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function readTarget()
in lib/configuration.js
71 29 2
57 14 1
54 14 5
function transformDDBRecord()
in lib/transformation.js
30 9 3
function ensureService()
in lib/services.js
33 9 3
function duplicateObject()
in lib/ddb-utils.js
20 8 1
exports.get = function()
in lib/services.js
27 8 2
var register = function()
in lib/statistics.js
28 7 6
22 6 3
function deserialize()
in lib/redis.js
19 6 1
var runQuery = function()
in lib/configuration.js
32 6 1
var addValue = function()
in lib/statistics.js
26 6 2
var _publish = function()
in lib/statistics.js
24 5 0
exports.servers = function()
in lib/memcached.js
49 5 2
38 5 2
function serialize()
in lib/redis.js
12 4 1
47 4 3
exports.send = function()
in lib/post-sns.js
22 4 4
exports.send = function()
in lib/post-iot.js
22 4 4
19 4 2