apple / swift-sample-distributed-actors-transport
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 42 units with 338 lines of code in units (21.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (126 lines of code)
    • 5 small units (81 lines of code)
    • 33 very small units (131 lines of code)
0% | 0% | 37% | 23% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift0% | 0% | 37% | 23% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
FishyTransport/Sources/FishyActorTransport0% | 0% | 42% | 22% | 35%
SampleApp/Sources/FishyActorsDemo0% | 0% | 42% | 0% | 57%
FishyTransport/Plugins/FishyActorTransportPlugin0% | 0% | 100% | 0% | 0%
FishyTransport/Sources/FishyActorsGenerator0% | 0% | 0% | 60% | 39%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func onMessageComplete()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
40 4 2
mutating func run()
in SampleApp/Sources/FishyActorsDemo/main.swift
33 2 0
func deliver()
in FishyTransport/Sources/FishyActorTransport/FishyTransport.swift
27 2 1
func createBuildCommands()
in FishyTransport/Plugins/FishyActorTransportPlugin/FishyPlugin.swift
26 2 1
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 bootstrap()
in FishyTransport/Sources/FishyActorTransport/FishyTransport+Server.swift
15 1 2
func isDistributed()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
15 3 1
func isDistributed()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
11 3 1
init()
in FishyTransport/Sources/FishyActorTransport/FishyTransport.swift
7 1 4
init()
in FishyTransport/Sources/FishyActorTransport/FishyTransport.swift
7 1 2
func analyze()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
7 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
init()
in FishyTransport/Sources/FishyActorTransport/FishyTransport.swift
5 1 3
func gatherParams()
in FishyTransport/Sources/FishyActorsGenerator/Analysis.swift
5 1 0
init()
in SampleApp/Sources/FishyActorsDemo/Actors.swift
5 1 2
mutating func appendInterpolation()
in SampleApp/Sources/FishyActorsDemo/_PrettyDemoLogger.swift
5 1 2
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