aws-samples / chip-wafer-classification-deep-learning
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 48 units with 626 lines of code in units (16.4% 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)
    • 0 simple units (0 lines of code)
    • 48 very simple units (626 lines of code)
0% | 0% | 0% | 0% | 100%
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
js0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
frontend/src/containers0% | 0% | 0% | 0% | 100%
notebooks0% | 0% | 0% | 0% | 100%
frontend/src0% | 0% | 0% | 0% | 100%
lambda-rpi-inference0% | 0% | 0% | 0% | 100%
pytorch_code/classifier0% | 0% | 0% | 0% | 100%
deploy_code0% | 0% | 0% | 0% | 100%
frontend/src/components0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _train()
in pytorch_code/classifier/classifier.py
24 5 1
export default function register()
in frontend/src/registerServiceWorker.js
22 5 0
def input_fn()
in pytorch_code/classifier/classifier.py
8 4 2
async componentDidMount()
in frontend/src/App.js
13 4 0
def train()
in notebooks/classify_mxnet.py
57 4 5
def transform_fn()
in notebooks/classify_mxnet.py
20 4 4
def model_fn()
in pytorch_code/classifier/classifier.py
8 3 1
async componentDidMount()
in frontend/src/containers/Home.js
14 3 0
async updateImgList()
in frontend/src/containers/Home.js
13 3 4
function registerValidSW()
in frontend/src/registerServiceWorker.js
21 3 1
function checkValidServiceWorker()
in frontend/src/registerServiceWorker.js
22 3 1
def output_fn()
in pytorch_code/classifier/classifier.py
4 2 2
validateForm()
in frontend/src/containers/Login.js
3 2 0
getimages()
in frontend/src/containers/Home.js
11 2 4
renderCameraList()
in frontend/src/containers/Home.js
9 2 1
handleImgPrev()
in frontend/src/containers/Home.js
13 2 0
handleImgNext()
in frontend/src/containers/Home.js
13 2 0
renderImgCard()
in frontend/src/containers/Home.js
20 2 4
renderOverride()
in frontend/src/containers/Home.js
7 2 1
renderDetailCard()
in frontend/src/containers/Home.js
26 2 3