aws-samples / amazon-ivs-feed-ios-demo
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 20 units with 128 lines of code in units (23.7% 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)
    • 3 small units (41 lines of code)
    • 17 very small units (87 lines of code)
0% | 0% | 0% | 32% | 67%
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% | 32% | 67%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ScrollingFeed/Controllers0% | 0% | 0% | 40% | 59%
ScrollingFeed/Models0% | 0% | 0% | 0% | 100%
ScrollingFeed0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func loadStream()
in ScrollingFeed/Controllers/StreamViewController.swift
19 3 0
func pageViewController()
in ScrollingFeed/Controllers/StreamsViewController.swift
11 2 2
func pageViewController()
in ScrollingFeed/Controllers/StreamsViewController.swift
11 2 2
func application()
in ScrollingFeed/AppDelegate.swift
9 2 2
func pageViewController()
in ScrollingFeed/Controllers/StreamsViewController.swift
8 3 2
init()
in ScrollingFeed/Models/Stream.swift
8 1 6
func presentError()
in ScrollingFeed/Controllers/StreamsViewController.swift
7 1 2
func presentAlert()
in ScrollingFeed/Controllers/StreamsViewController.swift
7 1 2
func didTapShare()
in ScrollingFeed/Controllers/StreamsViewController.swift
7 1 1
func presentError()
in ScrollingFeed/Controllers/StreamViewController.swift
5 1 2
init()
in ScrollingFeed/Models/Stream.swift
5 1 3
init()
in ScrollingFeed/Models/Stream.swift
5 1 3
func presentAlert()
in ScrollingFeed/Controllers/StreamViewController.swift
4 1 2
func setup()
in ScrollingFeed/Controllers/StreamViewController.swift
4 1 2
func didTapShare()
in ScrollingFeed/Controllers/StreamViewController.swift
3 1 1
func startPlayback()
in ScrollingFeed/Controllers/StreamViewController.swift
3 1 0
func pausePlayback()
in ScrollingFeed/Controllers/StreamViewController.swift
3 1 0
func player()
in ScrollingFeed/Controllers/StreamViewController.swift
3 1 2
func player()
in ScrollingFeed/Controllers/StreamViewController.swift
3 1 2
func player()
in ScrollingFeed/Controllers/StreamViewController.swift
3 2 2