microsoft / appcenter-sampleapp-ios-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 10 units with 94 lines of code in units (44.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (22 lines of code)
    • 1 small units (16 lines of code)
    • 8 very small units (56 lines of code)
0% | 0% | 23% | 17% | 59%
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% | 23% | 17% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sampleapp-ios-swift0% | 0% | 24% | 17% | 57%
sampleapp-ios-swiftUITests0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
func presentColorPropertyAlert()
in sampleapp-ios-swift/AnalyticsViewController.swift
22 1 0
func presentCrashAlert()
in sampleapp-ios-swift/CrashViewController.swift
16 1 0
func presentCustomEventAlert()
in sampleapp-ios-swift/AnalyticsViewController.swift
10 1 0
func presentCustomUserIdAlert()
in sampleapp-ios-swift/CrashViewController.swift
10 1 0
func pageViewController()
in sampleapp-ios-swift/RootViewController.swift
9 2 2
func application()
in sampleapp-ios-swift/AppDelegate.swift
8 1 2
func pageViewController()
in sampleapp-ios-swift/RootViewController.swift
8 3 2
func testSwipeUntilCrashesPage()
in sampleapp-ios-swiftUITests/sampleapp_ios_swiftUITests.swift
5 1 0
func presentationCount()
in sampleapp-ios-swift/RootViewController.swift
3 1 1
func presentationIndex()
in sampleapp-ios-swift/RootViewController.swift
3 1 1