aws-samples / aws-codeguru-profiler-python-demo-application
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 64 units with 498 lines of code in units (48.9% 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 (46 lines of code)
    • 62 very simple units (452 lines of code)
0% | 0% | 0% | 9% | 90%
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% | 9% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sample-demo-flask-app/flaskr0% | 0% | 0% | 25% | 74%
sample-demo-app/aws_python_sample_application0% | 0% | 0% | 0% | 100%
sample-demo-django-app/polls0% | 0% | 0% | 0% | 100%
sample-demo-lambda-app0% | 0% | 0% | 0% | 100%
sample-demo-django-app0% | 0% | 0% | 0% | 100%
sample-demo-flask-app0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_app()
in sample-demo-flask-app/flaskr/__init__.py
23 6 1
def register()
in sample-demo-flask-app/flaskr/auth.py
23 6 0
def check_prime()
in sample-demo-lambda-app/lambda_function.py
9 5 1
def login()
in sample-demo-flask-app/flaskr/auth.py
19 5 0
def lambda_handler()
in sample-demo-lambda-app/lambda_function.py
16 4 2
def run()
in sample-demo-app/aws_python_sample_application/image_processor.py
18 4 1
def create()
in sample-demo-flask-app/flaskr/blog.py
19 4 0
def get_post()
in sample-demo-flask-app/flaskr/blog.py
12 4 2
def update()
in sample-demo-flask-app/flaskr/blog.py
20 4 1
def publish_image_transform_task()
in sample-demo-app/aws_python_sample_application/task_publisher.py
10 3 2
def _extract_tasks()
in sample-demo-app/aws_python_sample_application/image_processor.py
13 3 1
def vote()
in sample-demo-django-app/polls/views.py
13 3 2
def _list_image_on_s3()
in sample-demo-app/aws_python_sample_application/task_publisher.py
10 2 1
def _upload_images_onto_s3()
in sample-demo-app/aws_python_sample_application/task_publisher.py
9 2 1
def _send_sqs_message()
in sample-demo-app/aws_python_sample_application/task_publisher.py
9 2 2
def delete_file()
in sample-demo-app/aws_python_sample_application/image_processor.py
7 2 1
def _download_image()
in sample-demo-app/aws_python_sample_application/image_processor.py
8 2 3
def _upload_file()
in sample-demo-app/aws_python_sample_application/image_processor.py
7 2 4
def monochrome_and_upload()
in sample-demo-app/aws_python_sample_application/image_processor.py
12 2 2
def _upload_file()
in sample-demo-app/aws_python_sample_application/image_processor.py
7 2 4