apple / swift-se0270-range-set
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 10 units with 62 lines of code in units (7.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 2 small units (26 lines of code)
    • 8 very small units (36 lines of code)
0% | 0% | 0% | 41% | 58%
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% | 0% | 41% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Sources/SE0270_RangeSet0% | 0% | 0% | 50% | 50%
Sources/TestHelpers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
mutating func _swapNonemptySubrangePrefixes()
in Sources/SE0270_RangeSet/Partition.swift
15 3 2
func _indicesOfRange()
in Sources/SE0270_RangeSet/RangeSet.swift
11 1 1
init()
in Sources/SE0270_RangeSet/RangeSetStorage.swift
9 2 1
mutating func _makeUnique()
in Sources/TestHelpers/COWLoggingArray.swift
6 2 0
func hash()
in Sources/SE0270_RangeSet/RangeSetStorage.swift
5 2 1
init()
in Sources/TestHelpers/COWLoggingArray.swift
4 1 1
init()
in Sources/SE0270_RangeSet/Pair.swift
3 1 2
init()
in Sources/SE0270_RangeSet/RangeSetStorage.swift
3 1 0
init()
in Sources/SE0270_RangeSet/RangeSetStorage.swift
3 1 1
func unsafeRange()
in Sources/SE0270_RangeSet/RangeSetStorage.swift
3 1 2