awsdocs / aws-panorama-developer-guide
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 18 units with 247 lines of code in units (49.1% 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)
    • 2 simple units (14 lines of code)
    • 16 very simple units (233 lines of code)
0% | 0% | 0% | 5% | 94%
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% | 5% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
custom-model/code0% | 0% | 0% | 5% | 94%
custom-model/code/model0% | 0% | 0% | 6% | 93%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
def process_results()
in sample-apps/custom-model/code/application.py
8 7 3
def remove()
in sample-apps/custom-model/code/model/model.py
6 6 2
def process_media()
in sample-apps/custom-model/code/application.py
21 5 2
def wait_compilation()
in sample-apps/custom-model/code/model/model.py
9 4 2
def wait_packaging()
in sample-apps/custom-model/code/model/model.py
9 4 2
def entry()
in sample-apps/custom-model/code/application.py
24 4 3
def init()
in sample-apps/custom-model/code/application.py
25 3 4
def compile()
in sample-apps/custom-model/code/keras-model.py
19 3 2
def export_model()
in sample-apps/custom-model/code/model/model.py
18 2 3
def __init__()
in sample-apps/custom-model/code/keras-model.py
9 2 1
def __init__()
in sample-apps/custom-model/code/model/model.py
3 1 3
def compile_model()
in sample-apps/custom-model/code/model/model.py
23 1 8
def package_model()
in sample-apps/custom-model/code/model/model.py
17 1 3
def upload()
in sample-apps/custom-model/code/model/model.py
4 1 4
def interface()
in sample-apps/custom-model/code/application.py
17 1 1
def preprocess()
in sample-apps/custom-model/code/application.py
16 1 2
def put_metric()
in sample-apps/custom-model/code/application.py
17 1 3
def main()
in sample-apps/custom-model/code/application.py
2 1 0