aws-samples / aws-sdk-js-tests
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 12 units with 106 lines of code in units (28.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (39 lines of code)
    • 1 small units (19 lines of code)
    • 10 very small units (48 lines of code)
0% | 0% | 36% | 17% | 45%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 48% | 23% | 27%
m0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
react-native/android/app/src/debug0% | 0% | 100% | 0% | 0%
react-native/android/app/src/main0% | 0% | 0% | 46% | 53%
react-native/ios/reactnative0% | 0% | 0% | 0% | 100%
utils/src0% | 0% | 0% | 0% | 100%
react-native0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
public static void initializeFlipper()
in packages/react-native/android/app/src/debug/java/com/reactnative/ReactNativeFlipper.java
39 3 2
private static void initializeFlipper()
in packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java
19 6 2
static void InitializeFlipper()
in packages/react-native/ios/reactnative/AppDelegate.m
9 1 1
credentials: fromCognitoIdentityPool()
in packages/utils/src/utils.js
6 1 2
getTransformOptions: async()
in packages/react-native/metro.config.js
6 1 0
protected List getPackages()
in packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java
5 1 0
public void onCreate()
in packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java
5 1 0
int main()
in packages/react-native/ios/reactnative/main.m
5 1 2
public boolean getUseDeveloperSupport()
in packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java
3 1 0
protected String getJSMainModuleName()
in packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java
3 1 0
public ReactNativeHost getReactNativeHost()
in packages/react-native/android/app/src/main/java/com/reactnative/MainApplication.java
3 1 0
protected String getMainComponentName()
in packages/react-native/android/app/src/main/java/com/reactnative/MainActivity.java
3 1 0