aws-samples / amazon-ivs-feed-android-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 34 units with 261 lines of code in units (26.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (84 lines of code)
    • 4 small units (61 lines of code)
    • 28 very small units (116 lines of code)
0% | 0% | 32% | 23% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt0% | 0% | 32% | 23% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scrollablefeed/ui0% | 0% | 58% | 23% | 17%
scrollablefeed/models0% | 0% | 45% | 20% | 33%
scrollablefeed/ui/viewmodels0% | 0% | 0% | 38% | 61%
scrollablefeed/common/heartview0% | 0% | 0% | 37% | 62%
scrollablefeed/common0% | 0% | 0% | 0% | 100%
scrollablefeed0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
override fun onCreate()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/ui/MainActivity.kt
49 5 1
fun initPlayer()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/models/StreamModel.kt
35 5 2
override fun onTransitionCompleted()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/ui/MainActivity.kt
20 2 2
fun reset()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/models/StreamModel.kt
16 2 0
fun scrollStreams()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/ui/viewmodels/MainViewModel.kt
14 3 1
fun start()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/heartview/PathAnimator.kt
11 1 2
fun mute()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/models/StreamModel.kt
9 3 1
fun setActive()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/models/StreamModel.kt
7 2 1
fun initPlayer()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/ui/viewmodels/MainViewModel.kt
7 1 2
fun clearAllViews()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/heartview/HeartLayout.kt
6 1 0
fun animateVisibility()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/BindingAdapters.kt
6 3 2
override fun onCreate()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/App.kt
6 2 0
override fun onAnimationEnd()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/heartview/PathAnimator.kt
5 1 1
override fun onSurfaceTextureAvailable()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/ViewExtensions.kt
4 1 3
fun setImage()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/BindingAdapters.kt
4 2 2
fun setUpdateUi()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/BindingAdapters.kt
4 2 3
override fun create()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/common/ViewModelExtensions.kt
4 1 1
override fun toString()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/models/StreamModel.kt
4 1 0
fun togglePause()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/ui/viewmodels/MainViewModel.kt
4 1 0
fun play()
in app/src/main/java/com/amazonaws/ivs/player/scrollablefeed/ui/viewmodels/MainViewModel.kt
4 1 0