microsoft / vscode-react-native
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 1,060 units with 13,799 lines of code in units (74.4% of code).
    • 5 very long units (723 lines of code)
    • 24 long units (1,613 lines of code)
    • 150 medium size units (4,541 lines of code)
    • 254 small units (3,673 lines of code)
    • 627 very small units (3,249 lines of code)
5% | 11% | 32% | 26% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts5% | 11% | 32% | 26% | 23%
js0% | 33% | 29% | 21% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/extension21% | 4% | 31% | 24% | 17%
src/debugger/direct43% | 0% | 27% | 13% | 15%
src/extension/ios0% | 25% | 46% | 13% | 15%
src/debugger0% | 22% | 37% | 23% | 16%
src/common0% | 8% | 24% | 30% | 36%
src/extension/android0% | 16% | 34% | 21% | 26%
src/extension/debuggingConfiguration0% | 17% | 33% | 30% | 18%
src/extension/networkInspector0% | 10% | 48% | 20% | 20%
src/extension/exponent0% | 14% | 35% | 22% | 28%
ROOT0% | 58% | 36% | 0% | 5%
src/extension/services0% | 6% | 33% | 35% | 25%
src/extension/windows0% | 70% | 0% | 15% | 14%
src/common/node0% | 0% | 27% | 34% | 37%
src/cdp-proxy0% | 0% | 32% | 52% | 15%
src/extension/macos0% | 0% | 31% | 60% | 7%
tools0% | 0% | 40% | 30% | 28%
src/cdp-proxy/CDPMessageHandlers0% | 0% | 0% | 52% | 47%
src/extension/log0% | 0% | 0% | 44% | 55%
SampleApplication0% | 0% | 0% | 100% | 0%
src/common/error0% | 0% | 0% | 0% | 100%
js-patched0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function registerReactNativeSpecialCommands()
in src/extension/rn-extension.ts
197 3 0
public async launch()
in src/extension/appLauncher.ts
160 22 1
export async function activate()
in src/extension/rn-extension.ts
133 9 1
protected async attachRequest()
in src/debugger/direct/directDebugSession.ts
117 16 3
116 1 0
protected async attachRequest()
in src/debugger/rnDebugSession.ts
99 11 3
public async runApp()
in src/extension/android/androidPlatform.ts
92 12 1
91 9 4
public async runApp()
in src/extension/exponent/exponentPlatform.ts
91 10 0
public async resolveMobileTarget()
in src/extension/generalMobilePlatform.ts
78 16 1
public async provideDebugConfigurations()
in src/extension/debuggingConfiguration/reactNativeDebugDynamicConfigProvider.ts
77 12 2
public async getExecutableAndConfigurationFolder()
in src/extension/ios/plistBuddy.ts
74 10 7
public async showInputBox()
in src/extension/debuggingConfiguration/multiStepInput.ts
73 10 10
private async deployOrStageFileForMobileApp()
in src/extension/networkInspector/certificateProvider.ts
72 8 7
protected async launchSimulator()
in src/extension/android/androidTargetManager.ts
69 7 1
public async start()
in src/common/packager.ts
68 8 1
public async getTargetFromRunArgs()
in src/extension/ios/iOSPlatform.ts
61 11 0
public async postMessage()
in src/debugger/forkedAppWorker.ts
59 6 1
private async showRandomGeneralTipNotification()
in src/extension/services/tipsNotificationsService/tipsNotificationService.ts
59 8 0
public async runApp()
in src/extension/windows/windowsPlatform.ts
59 7 1