awslabs / aws-streaming-media-analytics
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 91 units with 1,228 lines of code in units (53.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 6 simple units (218 lines of code)
    • 85 very simple units (1,010 lines of code)
0% | 0% | 0% | 17% | 82%
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% | 0% | 10% | 89%
py0% | 0% | 0% | 100% | 0%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda-functions/add-partition-function0% | 0% | 0% | 81% | 18%
lambda-functions/fastly-logs-processor-function0% | 0% | 0% | 100% | 0%
lambda-functions/cloudfront-logs-processor-function0% | 0% | 0% | 100% | 0%
web/reactplayer0% | 0% | 0% | 2% | 97%
lambda-functions/deploy-function0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in lambda-functions/fastly-logs-processor-function/prep-data.py
51 8 2
def lambda_handler()
in lambda-functions/cloudfront-logs-processor-function/prep-data.py
47 7 2
async function createPlayerLogsPartition()
in lambda-functions/add-partition-function/index.js
33 7 4
async function createCDNLogsPartition()
in lambda-functions/add-partition-function/index.js
33 7 4
async function createETLJobPartition()
in lambda-functions/add-partition-function/index.js
31 7 0
function uuid()
in web/reactplayer/public/test-harness/js/test-harness.js
23 6 0
function uploadUIAssets()
in lambda-functions/deploy-function/index.js
31 5 1
export default function register()
in web/reactplayer/src/registerServiceWorker.js
22 5 0
function getMetricDataFrame()
in web/reactplayer/public/test-harness/js/test-harness.js
73 5 0
var getConnectionType = function()
in web/reactplayer/src/sdk/QoSSDK.js
6 4 0
step = function()
in web/reactplayer/src/sdk/QoSSDK.js
24 4 3
onPlay()
in web/reactplayer/src/Components/VideoJSPlayer.js
21 4 1
$()
in web/reactplayer/public/test-harness/js/test-harness.js
13 4 1
function weightedRandTable()
in web/reactplayer/public/test-harness/js/test-harness.js
13 4 1
function copy()
in web/reactplayer/public/test-harness/js/test-harness.js
9 4 1
exports.handler = function()
in lambda-functions/deploy-function/index.js
19 3 2
export var SDK = function()
in web/reactplayer/src/sdk/QoSSDK.js
107 3 1
loadeddata = function()
in web/reactplayer/src/sdk/QoSSDK.js
17 3 5
bufferCompleted = function()
in web/reactplayer/src/sdk/QoSSDK.js
13 3 2
function registerValidSW()
in web/reactplayer/src/registerServiceWorker.js
21 3 1