aws-samples / amazon-ivs-broadcast-for-ios-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 66 units with 570 lines of code in units (16.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (39 lines of code)
    • 1 simple units (26 lines of code)
    • 64 very simple units (505 lines of code)
0% | 0% | 6% | 4% | 88%
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% | 6% | 4% | 88%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Broadcasting0% | 0% | 12% | 8% | 79%
Broadcasting/Views/Components0% | 0% | 0% | 0% | 100%
Broadcasting/Views/Broadcasting0% | 0% | 0% | 0% | 100%
Broadcasting/Helpers0% | 0% | 0% | 0% | 100%
Broadcasting/Views/Settings0% | 0% | 0% | 0% | 100%
ReplayKitBroadcaster0% | 0% | 0% | 0% | 100%
Broadcasting/Views/Onboarding0% | 0% | 0% | 0% | 100%
Broadcasting/Views/AutoConfiguration0% | 0% | 0% | 0% | 100%
Broadcasting/Views0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func loadVideoConfiguration()
in Broadcasting/BroadcastConfiguration.swift
39 11 0
func broadcastSession()
in Broadcasting/BroadcastViewDelegate.swift
26 6 2
func deviceOrientationChanged()
in Broadcasting/BroadcastViewModel.swift
12 5 1
func initializeBroadcastSession()
in Broadcasting/BroadcastViewModel.swift
25 4 0
func setupSlots()
in Broadcasting/BroadcastConfiguration.swift
21 4 0
func attachCameraPreview()
in Broadcasting/Views/Broadcasting/BroadcastPreview.swift
9 3 0
func toggleView()
in Broadcasting/Views/Components/RPSystemBroadcastPicker.swift
7 3 0
func body()
in Broadcasting/Views/Components/NotificationView.swift
54 3 1
func toggleBroadcastSession()
in Broadcasting/BroadcastViewModel.swift
18 3 0
func loadAudioConfiguration()
in Broadcasting/BroadcastConfiguration.swift
8 3 0
func broadcastSession()
in Broadcasting/BroadcastViewDelegate.swift
11 3 2
func broadcastSession()
in ReplayKitBroadcaster/SampleHandler.swift
9 2 2
init()
in Broadcasting/Views/Components/ControlButtonsSlider.swift
8 2 3
func toggleCamera()
in Broadcasting/BroadcastViewModel.swift
12 2 0
func flipCamera()
in Broadcasting/BroadcastViewModel.swift
7 2 0
func reconnectOnceNetworkIsAvailable()
in Broadcasting/BroadcastViewModel.swift
11 2 0
init()
in Broadcasting/Helpers/MonitorNetwork.swift
10 2 1
func updateResolution()
in Broadcasting/BroadcastConfiguration.swift
13 2 1
func setVideoBitrate()
in Broadcasting/BroadcastConfiguration.swift
14 2 1
func broadcastSession()
in ReplayKitBroadcaster/SampleHandler.swift
4 1 2