aws-samples / amazon-chime-react-native-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 69 units with 499 lines of code in units (32.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (72 lines of code)
    • 3 medium size units (100 lines of code)
    • 5 small units (62 lines of code)
    • 60 very small units (265 lines of code)
0% | 14% | 20% | 12% | 53%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 36% | 13% | 16% | 33%
java0% | 0% | 52% | 17% | 30%
kt0% | 0% | 16% | 7% | 75%
m0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/containers0% | 52% | 18% | 8% | 20%
android/app/src/debug0% | 0% | 100% | 0% | 0%
android/app/src/main0% | 0% | 14% | 11% | 74%
src0% | 0% | 0% | 59% | 40%
ios/RNDemo0% | 0% | 0% | 0% | 100%
src/components0% | 0% | 0% | 0% | 100%
src/utils0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
componentDidMount()
in src/containers/Meeting.js
72 7 0
public static void initializeFlipper()
in android/app/src/debug/java/com/amazonaws/services/chime/rndemo/ReactNativeFlipper.java
39 3 2
fun startMeeting()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridge.kt
35 5 2
componentWillUnmount()
in src/containers/Meeting.js
26 9 0
override fun onRequestPermissionsResult()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridge.kt
16 3 3
private static void initializeFlipper()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/MainApplication.java
13 3 2
constructor()
in src/containers/Meeting.js
11 1 0
componentDidMount()
in src/App.js
11 1 0
11 4 0
fun sendDataMessageEvent()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/RNEventEmitter.kt
10 1 2
render()
in src/containers/Login.js
9 2 0
constructor()
in src/App.js
9 1 0
static void InitializeFlipper()
in ios/RNDemo/AppDelegate.m
9 1 1
fun setMute()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridge.kt
8 2 1
fun setCameraOn()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridge.kt
8 2 1
override fun createNativeModules()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridgePackage.kt
7 1 1
fun sendVideoTileEvent()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/RNEventEmitter.kt
7 1 2
render()
in src/containers/Meeting.js
7 1 0
public void onCreate()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/MainApplication.java
6 1 0
fun unbindVideoView()
in android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridge.kt
6 1 1