aws-samples / aws-photo-to-sketch
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 498 lines of code in units (57.3% 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 (498 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
swift0% | 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
application/PhotoToSketch/PhotoToSketch/EffectApplyScreen0% | 0% | 0% | 0% | 100%
src/lambda0% | 0% | 0% | 0% | 100%
application/PhotoToSketch/PhotoToSketch/CameraScreen0% | 0% | 0% | 0% | 100%
src/src0% | 0% | 0% | 0% | 100%
src/lambda-inference0% | 0% | 0% | 0% | 100%
application/PhotoToSketch/PhotoToSketch/Helpers0% | 0% | 0% | 0% | 100%
application/PhotoToSketch/PhotoToSketch0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func checkRecordState()
in application/PhotoToSketch/PhotoToSketch/CameraScreen/CameraViewController.swift
25 5 0
func collectionView()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
20 4 2
func collectionView()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
11 4 3
def create_lambda_role()
in src/lambda/iam_helper.py
51 3 1
func cameraWithPosition()
in application/PhotoToSketch/PhotoToSketch/CameraScreen/CameraViewController.swift
9 3 1
func checkIntensityView()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
19 3 0
func topViewController()
in application/PhotoToSketch/PhotoToSketch/Helpers/PhotoToSketchLoader.swift
11 3 0
def tensor_to_image()
in src/src/predictor.py
7 2 1
def get_model()
in src/src/predictor.py
5 2 1
def ping()
in src/src/predictor.py
4 2 0
def inference()
in src/src/predictor.py
32 2 0
def tensor_to_image()
in src/lambda-inference/app.py
7 2 1
func imagePickerController()
in application/PhotoToSketch/PhotoToSketch/CameraScreen/CameraViewController.swift
9 2 2
func photoOutput()
in application/PhotoToSketch/PhotoToSketch/CameraScreen/CameraViewController.swift
10 2 3
func scrollViewDidScroll()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
8 2 1
func collectionView()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
7 2 2
func collectionView()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
5 2 2
func decodeBase64()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
6 2 1
func asImage()
in application/PhotoToSketch/PhotoToSketch/EffectApplyScreen/EffectApplyViewController.swift
14 2 0
def load_img()
in src/src/predictor.py
11 1 1