awslabs / lambda-streams-to-firehose
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 28 units with 520 lines of code in units (82.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (151 lines of code)
    • 8 simple units (256 lines of code)
    • 17 very simple units (113 lines of code)
0% | 0% | 29% | 49% | 21%
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% | 29% | 49% | 21%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 29% | 49% | 21%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
46 12 1
62 12 4
function init()
in index.js
43 11 1
26 9 2
41 9 4
41 8 5
23 6 4
28 6 5
28 6 5
29 6 1
40 6 4
init()
in index.js
19 5 1
14 4 5
14 3 1
6 3 3
8 3 2
8 2 4
9 2 1
setTimeout()
in index.js
7 2 5
3 1 2