aws-samples / cloud-experiments
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 58 units with 684 lines of code in units (6.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (83 lines of code)
    • 4 simple units (93 lines of code)
    • 52 very simple units (508 lines of code)
0% | 0% | 12% | 13% | 74%
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% | 12% | 14% | 73%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
experiments/notebooks/covid0% | 0% | 72% | 0% | 27%
api/streamlit_experiments0% | 0% | 16% | 18% | 64%
experiments/notebooks/cloudstory-api0% | 0% | 0% | 18% | 81%
experiments/data-apps/location0% | 0% | 0% | 0% | 100%
experiments/data-apps/covid_insights0% | 0% | 0% | 0% | 100%
experiments/data-apps/rides0% | 0% | 0% | 0% | 100%
experiments/data-apps/wine0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_today_stats()
in experiments/notebooks/covid/covid.py
47 12 1
def list_bucket_contents()
in api/streamlit_experiments/s3.py
36 11 0
def list_bucket_contents()
in experiments/notebooks/cloudstory-api/cloudstory.py
26 9 3
def video_persons_result()
in experiments/notebooks/cloudstory-api/cloudstory.py
27 8 1
def s3_select()
in api/streamlit_experiments/s3.py
24 7 0
def search_buckets()
in api/streamlit_experiments/s3.py
16 6 0
def list_buckets()
in experiments/notebooks/cloudstory-api/cloudstory.py
10 5 1
def list_glue_tables()
in experiments/notebooks/cloudstory-api/cloudstory.py
16 5 2
def video_labels_result()
in experiments/notebooks/cloudstory-api/cloudstory.py
25 5 1
function transformRequest()
in experiments/data-apps/location/location_map_component/location_map/frontend/src/LocationMap.tsx
15 4 2
def s3_select()
in experiments/notebooks/cloudstory-api/cloudstory.py
18 4 3
def image_label_count()
in experiments/notebooks/cloudstory-api/cloudstory.py
9 4 3
def double_days()
in api/streamlit_experiments/covid.py
15 3 1
def create_bucket()
in api/streamlit_experiments/s3.py
11 3 0
def list_resources()
in experiments/data-apps/location/location_api.py
29 3 0
def key_exists()
in experiments/notebooks/cloudstory-api/cloudstory.py
10 3 2
def heatmap()
in experiments/notebooks/cloudstory-api/cloudstory.py
8 3 1
def image_text()
in experiments/notebooks/cloudstory-api/cloudstory.py
13 3 4
def show_video()
in experiments/notebooks/cloudstory-api/cloudstory.py
14 3 5
def highlight_max()
in experiments/notebooks/covid/covid.py
3 3 1