aws-samples / aws-bikenow-demo
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 85 units with 1,505 lines of code in units (23.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)
    • 4 simple units (200 lines of code)
    • 81 very simple units (1,305 lines of code)
0% | 0% | 0% | 13% | 86%
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% | 25% | 74%
tsx0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambdas/setup_rds_ddl0% | 0% | 0% | 66% | 33%
lambdas/setup_datawarehouse_ddl0% | 0% | 0% | 62% | 37%
lambdas/setup_empty_bucket0% | 0% | 0% | 59% | 40%
lambdas/setup_upload_artifacts0% | 0% | 0% | 23% | 76%
assets/src0% | 0% | 0% | 0% | 100%
lambdas/setup_update_config0% | 0% | 0% | 0% | 100%
lambdas/api_post_rides0% | 0% | 0% | 0% | 100%
lambdas/api_get_rides0% | 0% | 0% | 0% | 100%
lambdas/api_predict_station_status0% | 0% | 0% | 0% | 100%
lambdas/stream_station_review_to_s30% | 0% | 0% | 0% | 100%
lambdas/api_get_reviews0% | 0% | 0% | 0% | 100%
lambdas/stream_station_status_to_es0% | 0% | 0% | 0% | 100%
lambdas/api_post_reviews0% | 0% | 0% | 0% | 100%
lambdas/api_search_stations0% | 0% | 0% | 0% | 100%
lambdas/load_station_detail_to_ddb0% | 0% | 0% | 0% | 100%
lambdas/api_get_quicksight_url0% | 0% | 0% | 0% | 100%
lambdas/stream_station_status_to_s30% | 0% | 0% | 0% | 100%
lambdas/load_station_status_to_ddb0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in lambdas/setup_rds_ddl/index.py
72 10 2
def lambda_handler()
in lambdas/setup_datawarehouse_ddl/index.py
59 9 2
def lambda_handler()
in lambdas/setup_upload_artifacts/index.py
33 7 2
def lambda_handler()
in lambdas/setup_empty_bucket/index.py
36 7 2
export default function register()
in assets/src/registerServiceWorker.ts
22 5 0
def lambda_handler()
in lambdas/load_station_detail_to_ddb/index.py
23 5 2
def lambda_handler()
in lambdas/stream_station_review_to_s3/index.py
29 5 2
function registerValidSW()
in assets/src/registerServiceWorker.ts
23 4 1
async componentDidMount()
in assets/src/modules/signup/Reviews.tsx
24 4 0
async bindBikeStationsToMap()
in assets/src/modules/signup/Home.tsx
19 4 1
renderReviewModal()
in assets/src/modules/signup/Home.tsx
51 4 0
renderBikeStations()
in assets/src/modules/signup/Home.tsx
29 4 1
async componentDidMount()
in assets/src/App.tsx
13 4 0
def lambda_handler()
in lambdas/load_station_status_to_ddb/index.py
21 4 2
def lambda_handler()
in lambdas/stream_station_status_to_es/index.py
21 4 2
def lambda_handler()
in lambdas/api_predict_station_status/index.py
29 4 2
def lambda_handler()
in lambdas/stream_station_status_to_s3/index.py
15 4 2
function checkValidServiceWorker()
in assets/src/registerServiceWorker.ts
22 3 1
async componentDidMount()
in assets/src/modules/signup/Rides.tsx
12 3 0
async componentDidMount()
in assets/src/modules/signup/Home.tsx
11 3 0