microsoft / azure-devops-auth-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 57 units with 793 lines of code in units (37.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (55 lines of code)
    • 11 medium size units (324 lines of code)
    • 16 small units (251 lines of code)
    • 29 very small units (163 lines of code)
0% | 6% | 40% | 31% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 19% | 43% | 14% | 22%
cs0% | 0% | 54% | 34% | 11%
py0% | 0% | 0% | 59% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
OAuthWebSample/OAuthWebSample0% | 14% | 60% | 6% | 18%
DeviceProfileSample0% | 0% | 75% | 25% | 0%
ManagedClientConsoleAppSample0% | 0% | 75% | 25% | 0%
PersonalAccessTokenAPIAppSample0% | 0% | 0% | 59% | 40%
JavascriptWebAppSample0% | 0% | 0% | 52% | 47%
NonInteractivePatGenerationSample/NonInteractivePatGenerationSample0% | 0% | 0% | 100% | 0%
ClientLibraryConsoleAppSample0% | 0% | 0% | 100% | 0%
ClientLibraryPatAppSample0% | 0% | 0% | 100% | 0%
DualSupportClientSample0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
applyMedia = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
55 27 1
(function( win )()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
40 7 1
public async Task RefreshToken()
in OAuthWebSample/OAuthWebSample/Controllers/OAuthController.cs
37 4 1
public async Task Callback()
in OAuthWebSample/OAuthWebSample/Controllers/OAuthController.cs
36 4 2
private static bool ValidateCallbackValues()
in OAuthWebSample/OAuthWebSample/Controllers/OAuthController.cs
33 5 3
translate = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
33 17 3
private static void ListProjects()
in ManagedClientConsoleAppSample/Program.cs
27 3 1
ripCSS = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
27 11 0
private static void ListProjects()
in DeviceProfileSample/Program.cs
26 3 1
22 2 1
getEmValue = function()
in OAuthWebSample/OAuthWebSample/Scripts/respond.js
22 3 0
private static async Task SignInUserAndGetTokenUsingMSAL()
in ManagedClientConsoleAppSample/Program.cs
21 2 1
def pat_put()
in PersonalAccessTokenAPIAppSample/app.py
20 7 0
public static void Main()
in NonInteractivePatGenerationSample/NonInteractivePatGenerationSample/Program.cs
19 1 1
def pat_post()
in PersonalAccessTokenAPIAppSample/app.py
19 6 0
static void Main()
in ClientLibraryConsoleAppSample/Program.cs
18 4 1
static void Main()
in ClientLibraryPatAppSample/Program.cs
18 4 1
function callApiWithToken()
in JavascriptWebAppSample/fetch.js
18 1 3
public static void Main()
in DualSupportClientSample/Program.cs
17 3 1
public static async Task Main()
in DeviceProfileSample/Program.cs
16 2 1