aws-samples / amazon-ivs-player-ios-sample
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 72 units with 511 lines of code in units (41.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (32 lines of code)
    • 9 small units (123 lines of code)
    • 62 very small units (356 lines of code)
0% | 0% | 6% | 24% | 69%
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% | 6% | 24% | 69%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
CustomUI/CustomUI/Controllers0% | 0% | 14% | 19% | 65%
QuizDemo/QuizDemo/Controllers0% | 0% | 0% | 23% | 76%
QuizDemo/QuizDemo/Custom0% | 0% | 0% | 75% | 25%
BasicPlayback/BasicPlayback0% | 0% | 0% | 27% | 72%
QuizDemo/QuizDemo/Models0% | 0% | 0% | 0% | 100%
QuizDemo/QuizDemo0% | 0% | 0% | 0% | 100%
CustomUI/CustomUI0% | 0% | 0% | 0% | 100%
CustomUI/CustomUI/Views0% | 0% | 0% | 0% | 100%
CustomUI/CustomUI/Models0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func player()
in CustomUI/CustomUI/Controllers/MainViewController.swift
32 6 2
func applyStyleToControlsView()
in CustomUI/CustomUI/Controllers/MainViewController.swift
18 3 0
func applyShadow()
in QuizDemo/QuizDemo/Custom/UIView.swift
16 1 0
func player()
in QuizDemo/QuizDemo/Controllers/PlayerViewController.swift
16 3 2
func show()
in QuizDemo/QuizDemo/Controllers/PlayerViewController.swift
14 1 1
func presentActionSheet()
in CustomUI/CustomUI/Controllers/MainViewController.swift
14 2 3
func loadStream()
in BasicPlayback/BasicPlayback/ViewController.swift
12 2 1
func applyGradientBackground()
in QuizDemo/QuizDemo/Custom/UIView.swift
11 1 0
func showWaitingLabel()
in QuizDemo/QuizDemo/Controllers/PlayerViewController.swift
11 1 0
func presentAlert()
in CustomUI/CustomUI/Controllers/MainViewController.swift
11 2 1
func textFieldShouldReturn()
in QuizDemo/QuizDemo/Controllers/SourceViewController.swift
10 2 1
func tableView()
in QuizDemo/QuizDemo/Controllers/SourceViewController.swift
10 1 2
func tableView()
in CustomUI/CustomUI/Controllers/SourceSelectViewController.swift
10 1 2
func loadStream()
in CustomUI/CustomUI/Controllers/MainViewController.swift
10 3 1
func loadData()
in CustomUI/CustomUI/Controllers/MainViewController.swift
10 2 0
func player()
in BasicPlayback/BasicPlayback/ViewController.swift
10 3 2
func setBackgroundColor()
in QuizDemo/QuizDemo/Custom/AnswerButton.swift
9 1 2
func fill()
in QuizDemo/QuizDemo/Controllers/SourceEntityCell.swift
9 1 1
func loadData()
in QuizDemo/QuizDemo/Controllers/SourceViewController.swift
9 2 0
func application()
in QuizDemo/QuizDemo/AppDelegate.swift
9 2 2