aws-samples / aws-simple-streaming-webapp
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 14 units with 428 lines of code in units (24.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (344 lines of code)
    • 2 simple units (32 lines of code)
    • 9 very simple units (52 lines of code)
0% | 0% | 80% | 7% | 12%
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% | 93% | 0% | 6%
py0% | 0% | 21% | 42% | 36%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
frontend/src/components0% | 0% | 99% | 0% | <1%
backend0% | 0% | 21% | 42% | 36%
frontend/src/components/player0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 14 most complex units
Unit# linesMcCabe index# params
function Streampage()
in frontend/src/components/stream.js
328 22 1
def set_to_replace()
in backend/lambda_function.py
7 11 4
def set_new_server()
in backend/lambda_function.py
9 11 4
def lambda_handler()
in backend/lambda_function.py
14 7 2
def get_values()
in backend/lambda_function.py
18 6 0
componentWillUnmount()
in frontend/src/components/player/player.js
5 2 0
constructor()
in frontend/src/components/player/player.js
3 1 1
componentDidMount()
in frontend/src/components/player/player.js
5 1 0
videojs.Hls.xhr.beforeRequest = function()
in frontend/src/components/player/player.js
4 1 1
render()
in frontend/src/components/player/player.js
5 1 0
await sleep()
in frontend/src/components/stream.js
2 1 1
def set_default_values()
in backend/lambda_function.py
10 1 4
def update_values()
in backend/lambda_function.py
10 1 4
def get_public_ip()
in backend/lambda_function.py
8 1 1