awslabs / aws-sdk-ios-samples
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 25 units with 343 lines of code in units (21.5% 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)
    • 1 simple units (50 lines of code)
    • 24 very simple units (293 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 15% | 84%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
IoT-Sample/Swift/IoTSampleSwift0% | 0% | 0% | 20% | 79%
Lex-Sample/Swift/LexSwift0% | 0% | 0% | 0% | 100%
Polly-Sample/Swift/PollySample0% | 0% | 0% | 0% | 100%
S3TransferUtility-Sample/Swift/S3BackgroundTransferSampleSwift0% | 0% | 0% | 0% | 100%
S3TransferUtility-Sample/Swift/S3TransferUtilitySampleSwiftUITests0% | 0% | 0% | 0% | 100%
S3TransferUtility-Sample/Objective-C/S3BackgroundTransferSampleObjC0% | 0% | 0% | 0% | 100%
Lex-Sample/ObjC/Lex-Sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func mqttEventCallback()
in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController.swift
50 7 1
func voiceButton()
in Lex-Sample/Swift/LexSwift/VoiceChatViewController.swift
14 3 2
func handleConnectViaCert()
in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController.swift
27 3 0
func createCertificateIdAndStoreinNSUserDefaults()
in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController.swift
42 3 1
func mqttEventCallbackWebsocket()
in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController+Websocket.swift
16 2 1
func searchForExistingCertificateIdInBundle()
in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController.swift
31 2 0
func pickerView()
in Polly-Sample/Swift/PollySample/ViewController.swift
4 1 3
func pickerView()
in Polly-Sample/Swift/PollySample/ViewController.swift
3 1 3
func pickerView()
in Polly-Sample/Swift/PollySample/ViewController.swift
3 1 2
func application()
in Polly-Sample/Swift/PollySample/AppDelegate.swift
10 1 2
int main()
in S3TransferUtility-Sample/Objective-C/S3BackgroundTransferSampleObjC/main.m
5 1 2
func application()
in S3TransferUtility-Sample/Swift/S3BackgroundTransferSampleSwift/AppDelegate.swift
14 1 3
func application()
in S3TransferUtility-Sample/Swift/S3BackgroundTransferSampleSwift/AppDelegate.swift
3 1 2
func testButtons()
in S3TransferUtility-Sample/Swift/S3TransferUtilitySampleSwiftUITests/S3TransferUtilitySampleSwiftUITests.swift
17 1 0
int main()
in Lex-Sample/ObjC/Lex-Sample/main.m
5 1 2
func interactionKitContinue()
in Lex-Sample/Swift/LexSwift/ChatViewController.swift
3 1 2
func application()
in Lex-Sample/Swift/LexSwift/AppDelegate.swift
16 1 2
func handleConnectViaWebsocket()
in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController+Websocket.swift
9 1 0
func textFieldShouldReturn()
in IoT-Sample/Swift/IoTSampleSwift/ConfigurationViewController.swift
4 1 1
func textFieldDidEndEditing()
in IoT-Sample/Swift/IoTSampleSwift/ConfigurationViewController.swift
7 1 1