apple / swift-tools-support-async
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 65 units with 988 lines of code in units (17.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (432 lines of code)
    • 2 simple units (64 lines of code)
    • 59 very simple units (492 lines of code)
0% | 0% | 43% | 6% | 49%
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% | 43% | 6% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Sources/TSFCASFileTree0% | 0% | 57% | 5% | 36%
Sources/TSFCASFileTree/Internal0% | 0% | 42% | 16% | 41%
Sources/TSFCAS0% | 0% | 0% | 0% | 100%
Sources/TSFCAS/Implementations0% | 0% | 0% | 0% | 100%
Sources/TSFCASUtilities0% | 0% | 0% | 0% | 100%
Sources/TSFFutures0% | 0% | 0% | 0% | 100%
Sources/TSFUtility0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func run()
in Sources/TSFCASFileTree/FileTreeImport.swift
167 19 1
func assemblePartialNextSteps()
in Sources/TSFCASFileTree/FileTreeImport.swift
121 17 0
func fetchSegment()
in Sources/TSFCASFileTree/Internal/FileSegmenter.swift
71 15 1
func makeNextStep()
in Sources/TSFCASFileTree/FileTreeImport.swift
73 13 3
func describeAllSegments()
in Sources/TSFCASFileTree/FileTreeImport.swift
37 8 2
func parseDirectory()
in Sources/TSFCASFileTree/Internal/FileTreeParser.swift
27 6 3
func normalized()
in Sources/TSFCASFileTree/FileTreeImport.swift
17 5 2
func grabFilenames()
in Sources/TSFCASFileTree/Internal/ConcurrentFilesystemScanner.swift
26 5 1
func prepareSingleSegment()
in Sources/TSFCASFileTree/FileTreeImport.swift
17 3 3
init()
in Sources/TSFCASFileTree/Internal/FileSegmenter.swift
38 3 5
init()
in Sources/TSFCAS/Implementations/Blake3DataID.swift
17 2 2
init()
in Sources/TSFCAS/Implementations/Blake3DataID.swift
17 2 2
func children()
in Sources/TSFCASFileTree/FileTreeExport.swift
26 2 2
func dbPut()
in Sources/TSFCASFileTree/FileTreeImport.swift
19 2 4
func encodeNextStep()
in Sources/TSFCASFileTree/FileTreeImport.swift
7 2 1
func constructDirectoryContents()
in Sources/TSFCASFileTree/FileTreeImport.swift
24 2 2
mutating func update()
in Sources/TSFCASFileTree/FileTreeImport.swift
5 2 2
mutating func update()
in Sources/TSFCASFileTree/FileTreeImport.swift
5 2 2
func fulfill()
in Sources/TSFFutures/Futures.swift
7 2 1
init?()
in Sources/TSFCAS/DataID.swift
7 1 1