aws-samples / deep-learning-web-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 39 units with 1,076 lines of code in units (11.0% 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 (111 lines of code)
    • 37 very simple units (965 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 27% | 72%
js0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
backend/training-pipeline/functions/api0% | 0% | 0% | 48% | 51%
frontend/webapp/src0% | 0% | 0% | 21% | 78%
frontend/webapp/src/containers0% | 0% | 0% | 0% | 100%
backend/training-pipeline/functions/step_functions0% | 0% | 0% | 0% | 100%
machine-learning/container/scripts0% | 0% | 0% | 0% | 100%
frontend/webapp/src/components0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function registerValidSW()
in frontend/webapp/src/serviceWorker.js
33 8 2
def post()
in backend/training-pipeline/functions/api/start_job.py
78 8 2
export function register()
in frontend/webapp/src/serviceWorker.js
22 5 1
def post()
in backend/training-pipeline/functions/api/infer.py
46 5 2
function checkValidServiceWorker()
in frontend/webapp/src/serviceWorker.js
25 4 2
render()
in frontend/webapp/src/containers/InferencePage.js
88 4 0
val: isInt ? parseInt()
in frontend/webapp/src/containers/TrainModelPage/TrainModelPage.js
8 4 2
async componentDidMount()
in frontend/webapp/src/App.js
12 4 0
constructor()
in frontend/webapp/src/containers/InferencePage.js
43 3 1
render()
in frontend/webapp/src/App.js
31 3 0
def loadmodel()
in machine-learning/container/scripts/predictor.py
8 2 2
def get_model()
in machine-learning/container/scripts/predictor.py
4 2 1
def ping()
in machine-learning/container/scripts/predictor.py
7 2 0
def transformation()
in machine-learning/container/scripts/predictor.py
17 2 0
export function unregister()
in frontend/webapp/src/serviceWorker.js
7 2 0
render()
in frontend/webapp/src/containers/TrainModelPage/TrainModelPage.js
27 2 0
def lambda_handler()
in backend/training-pipeline/functions/step_functions/delete_oldest_endpoint.py
39 2 2
def update_endpoint_arn()
in backend/training-pipeline/functions/step_functions/delete_oldest_endpoint.py
21 2 2
def predict()
in machine-learning/container/scripts/predictor.py
5 1 2
def transform_data()
in machine-learning/container/scripts/predictor.py
6 1 1