aws-samples / aws-serverless-connect-wallboard
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 27 units with 574 lines of code in units (52.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (49 lines of code)
    • 8 medium complex units (256 lines of code)
    • 6 simple units (136 lines of code)
    • 12 very simple units (133 lines of code)
0% | 8% | 44% | 23% | 23%
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% | 8% | 44% | 23% | 23%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 8% | 44% | 23% | 23%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def RenderCell()
in render-wallboard.py
49 28 3
def GetConfiguration()
in render-wallboard.py
68 22 1
def CheckThreshold()
in render-wallboard.py
25 19 2
def GetCells()
in wallboard-import.py
31 18 1
def GetRealtimeData()
in render-wallboard.py
35 14 0
def UpdateSettings()
in wallboard-import.py
13 12 2
def GetDataSources()
in wallboard-import.py
31 12 1
def GetHistoricalData()
in get-historical-metrics.py
34 12 0
def GetThresholds()
in wallboard-import.py
19 11 1
def GetNextAgent()
in render-wallboard.py
22 10 1
def GetConfiguration()
in get-historical-metrics.py
25 9 0
def lambda_handler()
in process-agent-event.py
28 8 2
def GetData()
in render-wallboard.py
19 8 0
def DoCalculation()
in render-wallboard.py
20 7 2
def lambda_handler()
in render-wallboard.py
22 6 2
def RenderHTML()
in render-wallboard.py
18 5 1
def GetAgentStates()
in wallboard-import.py
9 4 1
def SaveToDynamoDB()
in wallboard-import.py
14 4 3
def StoreMetric()
in render-wallboard.py
10 4 4
def GetCalculations()
in wallboard-import.py
8 3 1