microsoft / CSE-Telehealth-Samples
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 481 units with 3,962 lines of code in units (48.7% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (214 lines of code)
    • 33 medium size units (1,061 lines of code)
    • 74 small units (1,063 lines of code)
    • 371 very small units (1,624 lines of code)
0% | 5% | 26% | 26% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 6% | 18% | 29% | 46%
cs0% | 3% | 39% | 23% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
WebPortal/Scripts0% | 6% | 18% | 29% | 46%
API/Controllers0% | 23% | 25% | 39% | 11%
TrayListener0% | 0% | 39% | 28% | 32%
SfB Trusted Application0% | 0% | 51% | 0% | 48%
SfB Trusted Application/Job0% | 0% | 57% | 15% | 26%
API/Filters0% | 0% | 56% | 20% | 23%
SfB Trusted Application/Controllers0% | 0% | 76% | 0% | 23%
WebPortal/Controllers0% | 0% | 31% | 22% | 46%
WebPortal/App_Start0% | 0% | 65% | 0% | 34%
WebPortal/Models0% | 0% | 33% | 23% | 42%
API/App_Start0% | 0% | 0% | 64% | 35%
SfB Trusted Application/App_Start0% | 0% | 0% | 56% | 43%
API/Results0% | 0% | 0% | 26% | 73%
API/ErrorHandler0% | 0% | 0% | 100% | 0%
SfB Trusted Application/ErrorHandler0% | 0% | 0% | 100% | 0%
WebPortal/ErrorHandler0% | 0% | 0% | 100% | 0%
WebPortal0% | 0% | 0% | 0% | 100%
WebPortal/SignalR0% | 0% | 0% | 0% | 100%
API0% | 0% | 0% | 0% | 100%
SfB Trusted Application/Models0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function meetingConversationAdded()
in WebPortal/Scripts/multivideo.js
77 15 1
function ChangeDevices()
in WebPortal/Scripts/multivideo.js
74 11 1
public async Task Put()
in API/Controllers/MeetingController.cs
63 7 1
function register_popup()
in WebPortal/Scripts/meeting.js
48 5 3
public async Task Post()
in API/Controllers/MeetingController.cs
45 3 1
InitializeSkype()
in WebPortal/Scripts/devicetest.js
44 6 1
return t.getTimezone = function()
in WebPortal/Scripts/speedtest.js
42 21 0
function i()
in WebPortal/Scripts/speedtest.js
42 1 0
public async Task InitializeApplicationEndpointAsync()
in SfB Trusted Application/AzureBaseApplication.cs
41 2 10
$()
in WebPortal/Scripts/meeting.js
40 3 1
private async void SignIn()
in TrayListener/MainWindow.xaml.cs
39 7 2
protected abstract Task AuthenticateAsync()
in API/Filters/BasicAuthenticationAttribute.cs
38 5 3
private void HubConnection_StateChanged()
in TrayListener/MainWindow.xaml.cs
38 7 1
public async Task PostAsync()
in SfB Trusted Application/Controllers/GetAnonTokenJobController.cs
37 6 1
public void ConfigureAuth()
in WebPortal/App_Start/Startup.Auth.cs
36 1 1
public async Task AuthenticateAsync()
in API/Filters/BasicAuthenticationAttribute.cs
35 6 2
public override async Task ExecuteCoreWithResultAsync()
in SfB Trusted Application/Job/GetAnonTokenJob.cs
35 5 0
protected void Application_Start()
in SfB Trusted Application/Global.asax.cs
33 1 0
SignInToSkype()
in WebPortal/Scripts/clinic.js
32 2 1
public override Task OnActionExecutingAsync()
in SfB Trusted Application/LoggingContextActionFilter.cs
31 5 2