apple / swift-sample-distributed-actors-transport
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 42 units with 338 lines of code in units (21.8% 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 (20 lines of code)
    • 41 very simple units (318 lines of code)
0% | 0% | 0% | 5% | 94%
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% | 5% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
FishyTransport/Sources/FishyActorTransport0% | 0% | 0% | 12% | 87%
SampleApp/Sources/FishyActorsDemo0% | 0% | 0% | 0% | 100%
FishyTransport/Sources/FishyActorsGenerator0% | 0% | 0% | 0% | 100%
FishyTransport/Plugins/FishyActorTransportPlugin0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func channelRead()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
20 7 2
mutating func run()
in FishyTransport/Sources/FishyActorsGenerator/main.swift
20 5 0
func onMessageComplete()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
40 4 2
func isDistributed()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
15 3 1
func isDistributed()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
11 3 1
func createBuildCommands()
in FishyTransport/Plugins/FishyActorTransportPlugin/FishyPlugin.swift
26 2 1
func deliver()
in FishyTransport/Sources/FishyActorTransport/FishyTransport.swift
27 2 1
func analyze()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
7 2 1
init()
in FishyTransport/Sources/FishyActorsGenerator/SourceGen.swift
4 2 1
func generate()
in FishyTransport/Sources/FishyActorsGenerator/SourceGen.swift
7 2 1
mutating func appendInterpolation()
in SampleApp/Sources/FishyActorsDemo/_PrettyDemoLogger.swift
7 2 1
mutating func run()
in SampleApp/Sources/FishyActorsDemo/main.swift
33 2 0
mutating func requestReceived()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
4 1 0
mutating func requestComplete()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
4 1 0
mutating func responseComplete()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
4 1 0
init()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
3 1 1
func handlerAdded()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
2 1 1
func handlerRemoved()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
2 1 1
init()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
4 1 2
func bootstrap()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
15 1 2