microsoft / DataStreamerSamples
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 47 units with 718 lines of code in units (63.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (98 lines of code)
    • 9 medium size units (262 lines of code)
    • 14 small units (221 lines of code)
    • 23 very small units (137 lines of code)
0% | 13% | 36% | 30% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 20% | 35% | 23% | 21%
js0% | 0% | 39% | 46% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
MiddlemanElectronSampleApp/AppServiceHost/AppServiceUWP0% | 35% | 31% | 15% | 17%
MiddlemanElectronSampleApp/Electron0% | 0% | 39% | 46% | 14%
DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample0% | 0% | 41% | 34% | 24%
MiddlemanElectronSampleApp/PackagingProject/ElectronLauncher0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private async void DataServiceRequestReceived()
in MiddlemanElectronSampleApp/AppServiceHost/AppServiceUWP/App.xaml.cs
98 15 2
private async void OnAppServiceRequestReceived()
in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/App.xaml.cs
39 5 2
function UpdateConnectionStatus()
in MiddlemanElectronSampleApp/Electron/renderer.js
39 3 1
protected override void OnBackgroundActivated()
in MiddlemanElectronSampleApp/AppServiceHost/AppServiceUWP/App.xaml.cs
34 5 1
private async void ExcelOnAppServiceRequestReceived()
in MiddlemanElectronSampleApp/AppServiceHost/AppServiceUWP/App.xaml.cs
33 4 2
function Connect()
in MiddlemanElectronSampleApp/Electron/renderer.js
28 5 0
private async Task ReceiveDataAsync()
in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/MainPage.xaml.cs
25 4 0
function AppServiceConnectionStatusString()
in MiddlemanElectronSampleApp/Electron/renderer.js
22 9 1
protected override void OnLaunched()
in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/App.xaml.cs
21 5 1
protected override void OnLaunched()
in MiddlemanElectronSampleApp/AppServiceHost/AppServiceUWP/App.xaml.cs
21 5 1
function Write()
in MiddlemanElectronSampleApp/Electron/renderer.js
20 3 1
function AppServiceStatus()
in MiddlemanElectronSampleApp/Electron/renderer.js
20 4 0
private async Task SendDataAsync()
in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/MainPage.xaml.cs
18 4 0
function AppServiceResponseStatusString()
in MiddlemanElectronSampleApp/Electron/renderer.js
18 7 1
function Send()
in MiddlemanElectronSampleApp/Electron/renderer.js
17 3 0
function Read()
in MiddlemanElectronSampleApp/Electron/renderer.js
17 3 0
private async Task WriteDataAsync()
in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/App.xaml.cs
16 3 1
private async Task ReadDataAsync()
in DataStreamerAppServiceUWPCommSample/DataStreamerAppServiceUWPCommSample/App.xaml.cs
16 3 0
function createWindow()
in MiddlemanElectronSampleApp/Electron/main.js
15 1 0
private void ExcelResetConnection()
in MiddlemanElectronSampleApp/AppServiceHost/AppServiceUWP/App.xaml.cs
14 3 0