aws-samples / amazon-ipc-ai-saas
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 54 units with 989 lines of code in units (76.0% 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)
    • 10 simple units (414 lines of code)
    • 44 very simple units (575 lines of code)
0% | 0% | 0% | 41% | 58%
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% | 50% | 49%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/lambda0% | 0% | 0% | 100% | 0%
source/containers/body-detection0% | 0% | 0% | 91% | 8%
source/containers/face-detection0% | 0% | 0% | 91% | 8%
source/neo0% | 0% | 0% | 41% | 58%
source/containers/face-comparison0% | 0% | 0% | 28% | 71%
source/export0% | 0% | 0% | 58% | 41%
deployment0% | 0% | 0% | 37% | 62%
source/lib0% | 0% | 0% | 0% | 100%
source/simulate0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def post_process()
in source/neo/eval.py
28 7 4
def handler()
in source/lambda/main.py
95 7 2
def get_model()
in source/containers/body-detection/detector/predictor.py
33 6 1
def transformation()
in source/containers/body-detection/detector/predictor.py
49 6 0
def detect_and_align()
in source/containers/face-comparison/recognizer/predictor.py
46 6 4
def get_model()
in source/containers/face-detection/detector/predictor.py
33 6 1
def transformation()
in source/containers/face-detection/detector/predictor.py
49 6 0
def forward_test()
in source/export/gluoncv_model_export.py
43 6 4
def evaluate_inference_speed()
in source/neo/eval.py
21 6 3
def main()
in deployment/helper.py
17 6 0
def face_detect_simulate()
in source/simulate/detector.py
24 5 1
def body_detect_simulate()
in source/simulate/detector.py
21 5 1
def get_model()
in source/containers/face-comparison/recognizer/predictor.py
17 4 1
def get_largest_face()
in source/containers/face-comparison/recognizer/predictor.py
10 3 2
def predict()
in source/containers/face-comparison/recognizer/predictor.py
35 3 4
def ping()
in source/containers/face-comparison/recognizer/predictor.py
5 3 0
def compare()
in source/simulate/face_compare.py
25 3 1
def ping()
in source/containers/body-detection/detector/predictor.py
4 2 0
def transformation()
in source/containers/face-comparison/recognizer/predictor.py
21 2 0
def ping()
in source/containers/face-detection/detector/predictor.py
4 2 0