aws-samples / amazon-ivs-virtual-qa-web-demo
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 48 units with 898 lines of code in units (31.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (174 lines of code)
    • 4 simple units (78 lines of code)
    • 42 very simple units (646 lines of code)
0% | 0% | 19% | 8% | 71%
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
py0% | 0% | 27% | 18% | 54%
js0% | 0% | 13% | 2% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
backend/lambda/question-service0% | 0% | 75% | 0% | 25%
frontend/src/questionList0% | 0% | 71% | 10% | 17%
backend/lambda/vote-service0% | 0% | 0% | 86% | 13%
backend/lambda/vote-stream0% | 0% | 0% | 36% | 63%
backend/lambda/connection-stream0% | 0% | 0% | 18% | 81%
frontend/src/auth0% | 0% | 0% | 0% | 100%
frontend/src/addQuestion0% | 0% | 0% | 0% | 100%
frontend/src/player0% | 0% | 0% | 0% | 100%
backend/lambda/question-stream0% | 0% | 0% | 0% | 100%
frontend/src0% | 0% | 0% | 0% | 100%
frontend/src/providers0% | 0% | 0% | 0% | 100%
backend/lambda/websocket-service0% | 0% | 0% | 0% | 100%
frontend/src/util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambdaHandler()
in backend/lambda/question-service/lambda.py
102 16 2
function VoteButton()
in frontend/src/questionList/Question/VoteButton.js
72 12 4
def processRecords()
in backend/lambda/vote-stream/lambda.py
19 9 1
def lambdaHandler()
in backend/lambda/vote-service/lambda.py
38 7 2
function shouldShowQuestion()
in frontend/src/questionList/QuestionList.js
11 6 2
def lambdaHandler()
in backend/lambda/connection-stream/lambda.py
10 6 2
function AddQuestionModal()
in frontend/src/addQuestion/AddQuestionModal.js
99 5 1
def lambdaHandler()
in backend/lambda/question-stream/lambda.py
9 5 2
def sendRecordsToConnections()
in backend/lambda/question-stream/lambda.py
17 5 2
setupWebSocket()
in frontend/src/WebSocketClient.js
30 4 1
def updateQuestionVoteCounts()
in backend/lambda/vote-stream/lambda.py
18 4 1
def processRecords()
in backend/lambda/question-stream/lambda.py
10 4 1
def lambdaHandler()
in backend/lambda/websocket-service/lambda.py
22 4 2
def sendQuestionsToConnections()
in backend/lambda/connection-stream/lambda.py
16 4 2
question: pickQuestionProperties()
in frontend/src/providers/QuestionProvider.js
11 3 1
question: pickQuestionProperties()
in frontend/src/providers/QuestionProvider.js
12 3 1
function CurrentQuestion()
in frontend/src/player/CurrentQuestion.js
30 3 0
function AddQuestionButton()
in frontend/src/addQuestion/AddQuestionButton.js
26 3 0
function handleClickOutside()
in frontend/src/util/useOutsideClick.js
5 3 1
function getModeratorStatusFromSession()
in frontend/src/auth/SignInButton.js
8 3 1