awslabs / aws-crt-swift
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 49 units with 285 lines of code in units (6.3% 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)
    • 7 small units (89 lines of code)
    • 42 very small units (196 lines of code)
0% | 0% | 0% | 31% | 68%
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% | 31% | 68%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Source/AwsCommonRuntimeKit/crt0% | 0% | 0% | 30% | 69%
Source/AwsCommonRuntimeKit/auth0% | 0% | 0% | 73% | 26%
Source/AwsCommonRuntimeKit/http0% | 0% | 0% | 20% | 79%
Source/AwsCommonRuntimeKit0% | 0% | 0% | 24% | 75%
Source/AwsCommonRuntimeKit/io0% | 0% | 0% | 37% | 62%
Source/AwsCommonRuntimeKit/mqtt0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
init()
in Source/AwsCommonRuntimeKit/auth/imds/CRTIMDSInstanceInfo.swift
17 1 1
func chained()
in Source/AwsCommonRuntimeKit/crt/Future.swift
15 3 1
func toShutDownCPointer()
in Source/AwsCommonRuntimeKit/crt/ShutDownCallbackOptions.swift
13 1 0
func processResult()
in Source/AwsCommonRuntimeKit/crt/Future.swift
11 4 2
func toStringArray()
in Source/AwsCommonRuntimeKit/Utilities.swift
11 2 0
init()
in Source/AwsCommonRuntimeKit/io/TlsConnectionOptions.swift
11 2 2
func addHeaders()
in Source/AwsCommonRuntimeKit/http/HttpMessage.swift
11 3 1
func getHeaders()
in Source/AwsCommonRuntimeKit/http/HttpMessage.swift
10 3 0
func toLocalTimeString()
in Source/AwsCommonRuntimeKit/crt/AWSDate.swift
9 2 1
func toGMTString()
in Source/AwsCommonRuntimeKit/crt/AWSDate.swift
9 2 1
init()
in Source/AwsCommonRuntimeKit/crt/ByteCursor.swift
7 1 1
func encodeToHexString()
in Source/AwsCommonRuntimeKit/crt/ByteBuffer.swift
7 2 0
func toPointerArray()
in Source/AwsCommonRuntimeKit/Utilities.swift
7 2 1
func getHeader()
in Source/AwsCommonRuntimeKit/http/HttpMessage.swift
7 2 1
func allocate()
in Source/AwsCommonRuntimeKit/crt/Allocator.swift
6 1 0
func allocate()
in Source/AwsCommonRuntimeKit/crt/Allocator.swift
6 1 1
mutating func dequeue()
in Source/AwsCommonRuntimeKit/crt/Queue.swift
6 1 0
init()
in Source/AwsCommonRuntimeKit/auth/imds/CRTIAMProfile.swift
6 1 1
func toString()
in Source/AwsCommonRuntimeKit/Utilities.swift
6 2 0
func fromOptionalPointer()
in Source/AwsCommonRuntimeKit/Utilities.swift
6 2 1