aws-solutions / real-time-live-sports-updates-using-aws-appsync
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 118 units with 4,511 lines of code in units (9.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (50 lines of code)
    • 3 simple units (66 lines of code)
    • 113 very simple units (4,395 lines of code)
0% | 0% | 1% | 1% | 97%
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% | 1% | 1% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/scheduler-function0% | 0% | 31% | 0% | 68%
functions/gameupdates-notifications-function0% | 0% | 7% | 0% | 92%
webapp/src0% | 0% | 0% | 1% | 98%
functions/preprocess-function0% | 0% | 0% | 5% | 94%
functions/gamesimulator-init-function0% | 0% | 0% | 0% | 100%
functions/gamesimulator-scheduler-function0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function getFeedForGame()
in source/functions/scheduler-function/index.js
38 23 1
async function handleGameModify()
in source/functions/gameupdates-notifications-function/index.js
12 12 3
function sanitizeRecord()
in source/functions/preprocess-function/index.js
23 9 2
function registerValidSW()
in source/webapp/src/serviceWorker.js
33 8 2
getPeriodName()
in source/webapp/src/components/Game/index.js
10 7 1
export function register()
in source/webapp/src/serviceWorker.js
22 5 1
render()
in source/webapp/src/App.js
36 5 0
async function listAndCopyObjects()
in source/functions/gamesimulator-init-function/index.js
27 5 4
async function loadConfig()
in source/functions/preprocess-function/index.js
23 5 2
function checkValidServiceWorker()
in source/webapp/src/serviceWorker.js
25 4 2
await postGame()
in source/functions/preprocess-function/index.js
3 4 1
function filterOnRequiredRecord()
in source/functions/preprocess-function/index.js
13 4 2
componentDidMount()
in source/webapp/src/components/Game/index.js
29 3 0
async function uploadMainJsFile()
in source/functions/gamesimulator-init-function/index.js
28 3 4
async function handleGameInsert()
in source/functions/gameupdates-notifications-function/index.js
35 3 2
export function unregister()
in source/webapp/src/serviceWorker.js
11 2 0
componentDidMount()
in source/webapp/src/App.js
25 2 0
async function createGame()
in source/functions/gamesimulator-scheduler-function/index.js
27 2 1
async function getFeedForGame()
in source/functions/gamesimulator-scheduler-function/index.js
10 2 1
async function postGraphqlOperation()
in source/functions/gamesimulator-init-function/index.js
27 2 3