aws-samples / aws-cdk-adverse-event-detection-app
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 411 lines of code in units (13.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (91 lines of code)
    • 3 simple units (48 lines of code)
    • 22 very simple units (272 lines of code)
0% | 0% | 22% | 11% | 66%
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% | 22% | 11% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda0% | 0% | 100% | 0% | 0%
cloud90% | 0% | 27% | 23% | 48%
sagemaker/src0% | 0% | 0% | 16% | 83%
ae0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def stream_connect()
in cloud9/stream.py
39 17 3
def lambda_handler()
in lambda/inference.py
52 12 2
def locate()
in cloud9/stream.py
24 10 1
def gen_dict_extract()
in cloud9/stream.py
10 7 2
def input_fn()
in sagemaker/src/hf_train_deploy.py
14 6 2
def drug_types()
in cloud9/stream.py
6 5 2
def __init__()
in ae/ae_stack.py
22 4 5
def delete_all_rules()
in cloud9/stream.py
16 4 3
def set_rules()
in cloud9/stream.py
15 3 3
def _get_dataset()
in sagemaker/src/hf_train_deploy.py
9 3 4
def train()
in sagemaker/src/hf_train_deploy.py
40 3 1
def __init__()
in ae/modeling_stack.py
20 2 5
def __init__()
in ae/glue_stack.py
21 2 5
def get_bearer_token()
in cloud9/stream.py
10 2 1
def get_all_rules()
in cloud9/stream.py
9 2 2
def set_seed()
in sagemaker/src/hf_train_deploy.py
6 2 1
def model_fn()
in sagemaker/src/hf_train_deploy.py
5 2 1
def predict_fn()
in sagemaker/src/hf_train_deploy.py
11 2 2
def bucket()
in ae/s3_stack.py
2 1 1
def __init__()
in ae/s3_stack.py
20 1 4