aws-samples / aws-cdk-managed-elkk
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 39 units with 500 lines of code in units (30.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (132 lines of code)
    • 0 simple units (0 lines of code)
    • 36 very simple units (368 lines of code)
0% | 0% | 26% | 0% | 73%
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% | 26% | 0% | 73%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
filebeat0% | 0% | 90% | 0% | 9%
helpers0% | 0% | 15% | 0% | 84%
kibana0% | 0% | 14% | 0% | 85%
athena0% | 0% | 0% | 0% | 100%
vpc0% | 0% | 0% | 0% | 100%
logstash0% | 0% | 0% | 0% | 100%
elastic0% | 0% | 0% | 0% | 100%
kafka0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in kibana/lambda_function.py
15 16 2
def main()
in filebeat/log_generator.py
82 14 0
def update_kafka_configuration()
in helpers/functions.py
35 11 1
def generate_url()
in kibana/lambda_function.py
14 5 1
def proxy_headers()
in kibana/lambda_function.py
8 5 1
def main()
in helpers/s3_bucket_empty.py
22 4 2
def main()
in helpers/lambda_env_update.py
74 4 2
def ensure_service_linked_role()
in helpers/functions.py
13 4 1
def kafka_get_arn()
in helpers/functions.py
10 4 0
def elastic_get_domain()
in helpers/functions.py
10 4 0
def get_log_group_arn()
in helpers/functions.py
9 4 1
def clean_body()
in kibana/lambda_function.py
9 3 1
def choose_request_func()
in kibana/lambda_function.py
8 3 1
def file_updated()
in helpers/functions.py
9 3 2
def kafka_get_brokers()
in helpers/functions.py
13 3 0
def files_range()
in filebeat/log_generator.py
7 3 1
def instance_add_log_permissions()
in helpers/functions.py
12 2 1
def __init__()
in athena/athena_stack.py
42 2 4
def __init__()
in kibana/kibana_stack.py
8 1 0
def exception_response()
in kibana/lambda_function.py
5 1 0