aws-samples / aws-kms-workshop
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 20 units with 384 lines of code in units (85.5% 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 (264 lines of code)
    • 14 very simple units (120 lines of code)
0% | 0% | 0% | 68% | 31%
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% | 0% | 68% | 31%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 0% | 68% | 31%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def list_directory()
in WebAppEncSSE.py
41 10 2
41 10 2
def deal_post_data()
in WebAppEncSSE.py
53 9 1
46 8 1
def send_head()
in WebAppEncSSE.py
41 6 1
def send_head()
in WebApp.py
42 6 1
def do_POST()
in WebAppEncSSE.py
24 3 1
def translate_path()
in WebAppEncSSE.py
13 3 2
def guess_type()
in WebAppEncSSE.py
9 3 2
def do_POST()
in WebApp.py
24 3 1
13 3 2
def guess_type()
in WebApp.py
9 3 2
def do_GET()
in WebAppEncSSE.py
5 2 1
def do_HEAD()
in WebAppEncSSE.py
4 2 1
def do_GET()
in WebApp.py
5 2 1
def do_HEAD()
in WebApp.py
4 2 1
def copyfile()
in WebAppEncSSE.py
2 1 3
def test()
in WebAppEncSSE.py
3 1 2
def copyfile()
in WebApp.py
2 1 3
def test()
in WebApp.py
3 1 2