aws / amazon-ivs-react-native-player
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 87 units with 1,079 lines of code in units (42.9% of code).
    • 2 very long units (448 lines of code)
    • 1 long units (53 lines of code)
    • 6 medium size units (184 lines of code)
    • 5 small units (72 lines of code)
    • 73 very small units (322 lines of code)
41% | 4% | 17% | 6% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx82% | 9% | 4% | 0% | 2%
swift0% | 0% | 56% | 10% | 33%
java0% | 0% | 42% | 19% | 38%
kt0% | 0% | 13% | 13% | 73%
js0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
example/src/screens89% | 10% | 0% | 0% | 0%
ios0% | 0% | 56% | 10% | 33%
example/android/app0% | 0% | 42% | 19% | 38%
android/src/main0% | 0% | 13% | 13% | 73%
example/src0% | 0% | 73% | 0% | 26%
example0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
example/ios/AmazonIvsExample0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export default function PlaygroundExample()
in example/src/screens/PlaygroundExample.tsx
335 26 0
export default function AdvancedExample()
in example/src/screens/AdvancedExample.tsx
113 19 0
function Home()
in example/src/screens/Home.tsx
53 1 0
public static void initializeFlipper()
in example/android/app/src/debug/java/com/example/amazonivsreactnative/ReactNativeFlipper.java
39 3 2
fun onPlayerStateChange()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
37 3 1
func addPlayerObserver()
in ios/AmazonIvsView.swift
32 8 0
func player()
in ios/AmazonIvsView.swift
30 5 2
export default function App()
in example/src/App.tsx
25 1 0
func player()
in ios/AmazonIvsView.swift
21 3 2
private static void initializeFlipper()
in example/android/app/src/main/java/com/example/amazonivsreactnative/MainApplication.java
18 6 2
func player()
in ios/AmazonIvsView.swift
15 2 2
fun onTextCue()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
13 1 1
fun onQualityChange()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
13 1 1
override fun receiveCommand()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsViewManager.kt
13 1 3
fun setStreamUrl()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
10 1 1
fun onTextMetadataCue()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
10 1 1
override fun getCommandsMap()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsViewManager.kt
10 1 0
function Header()
in example/src/App.tsx
9 2 2
fun setLogLevel()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
8 1 1
protected ReactActivityDelegate createReactActivityDelegate()
in example/android/app/src/main/java/com/example/amazonivsreactnative/MainActivity.java
8 1 0