microsoft / appcenter-sdk-apple
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 393 units with 2,915 lines of code in units (6.3% of code).
    • 1 very long units (122 lines of code)
    • 5 long units (397 lines of code)
    • 22 medium size units (625 lines of code)
    • 26 small units (384 lines of code)
    • 339 very small units (1,387 lines of code)
4% | 13% | 21% | 13% | 47%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift5% | 6% | 24% | 14% | 48%
h0% | 56% | 0% | 5% | 37%
mm0% | 63% | 0% | 0% | 36%
m0% | 0% | 22% | 9% | 67%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
SasquatchMac15% | 9% | 15% | 11% | 48%
AppCenter0% | 64% | 0% | 6% | 28%
Sasquatch0% | 6% | 28% | 18% | 46%
AppCenterCrashes0% | 35% | 0% | 0% | 64%
SasquatchTV0% | 0% | 33% | 5% | 61%
AppCenterDistribute0% | 0% | 61% | 0% | 38%
AppCenterAnalytics0% | 0% | 0% | 57% | 42%
CrashLib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func tableView()
in SasquatchMac/SasquatchMac/ViewControllers/TransmissionViewController.swift
122 19 3
func application()
in Sasquatch/SasquatchSwift/AppDelegate.swift
90 13 2
typedef NS_ENUM()
in AppCenter/AppCenter/MSACConstants.h
86 1 2
typedef NS_ENUM()
in AppCenter/AppCenter/include/MSACConstants.h
86 1 2
func applicationDidFinishLaunching()
in SasquatchMac/SasquatchMacSwift/AppDelegate.swift
76 14 1
static void MSACCrashesUncaughtCXXTerminateHandler()
in AppCenterCrashes/AppCenterCrashes/Internals/MSACCrashesCXXExceptionHandler.mm
59 12 1
func onChangeType()
in Sasquatch/Sasquatch/ViewControllers/Cells/MSCustomPropertyTableViewCell.swift
45 6 1
func authenticationProvider()
in Sasquatch/Sasquatch/MSAAnalyticsAuthenticationProvider.swift
43 5 2
func authenticationProvider()
in SasquatchMac/SasquatchMac/ViewControllers/AuthenticationViewController.swift
41 5 2
func onChangeType()
in Sasquatch/Sasquatch/ViewControllers/MSAnalyticsTypedPropertyTableViewCell.swift
37 5 1
func testAnalytics()
in SasquatchTV/SasquatchTVUITests/AnalyticsUITests.swift
36 1 0
func eventPropertiesSet()
in SasquatchMac/SasquatchMac/ViewControllers/AnalyticsViewController.swift
32 9 0
func eventProperties()
in Sasquatch/Sasquatch/ViewControllers/Sections/EventPropertiesTableSection.swift
28 9 0
func testDisableSDKPersistence()
in Sasquatch/SasquatchUITests/AppCenterUITests.swift
28 2 0
func testEnableDisableSDK()
in SasquatchTV/SasquatchTVUITests/AppCenterUITests.swift
27 1 0
NSComparisonResult MSACCompareCurrentReleaseWithRelease()
in AppCenterDistribute/AppCenterDistribute/MSACDistributeUtil.m
26 8 1
func testTrackEvent()
in Sasquatch/SasquatchUITests/AnalyticsUITests.swift
26 2 0
func testTrackEventWithOneProps()
in Sasquatch/SasquatchUITests/AnalyticsUITests.swift
26 2 0
func testTrackEventWithTooMuchProps()
in Sasquatch/SasquatchUITests/AnalyticsUITests.swift
26 2 0
func testTrackEventWithDisabledAnalytics()
in Sasquatch/SasquatchUITests/AnalyticsUITests.swift
26 2 0