microsoft / FMLab
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 49 units with 868 lines of code in units (75.0% of code).
    • 1 very long units (200 lines of code)
    • 0 long units (0 lines of code)
    • 12 medium size units (429 lines of code)
    • 6 small units (89 lines of code)
    • 30 very small units (150 lines of code)
23% | 0% | 49% | 10% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs23% | 0% | 50% | 8% | 17%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
FMLab/ConnectorClientApplication63% | 0% | 17% | 7% | 11%
FMLab/Odata4ConsoleApplication0% | 0% | 76% | 6% | 17%
FMLab/ODataConsoleApplication0% | 0% | 67% | 6% | 26%
FMLab0% | 0% | 0% | 100% | 0%
FMLab/TaskRecorderScreenshot0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in FMLab/ConnectorClientApplication/mainForm.Designer.cs
200 1 0
private void WebBrowser_Navigating()
in FMLab/ODataConsoleApplication/BrowserForm.cs
49 5 2
private void WebBrowser_Navigating()
in FMLab/Odata4ConsoleApplication/BrowserForm.cs
49 6 2
static void Main()
in FMLab/Odata4ConsoleApplication/Program.cs
45 1 1
private static FleetRental CreateReservation()
in FMLab/Odata4ConsoleApplication/Program.cs
38 4 1
private static FleetCustomer CreateCustomer()
in FMLab/Odata4ConsoleApplication/Program.cs
37 4 0
static void Main()
in FMLab/ODataConsoleApplication/Program.cs
35 1 1
internal static string PerformAuthentication()
in FMLab/ODataConsoleApplication/AuthenticationHelper.cs
33 3 1
internal static string PerformAuthentication()
in FMLab/Odata4ConsoleApplication/AuthenticationHelper.cs
33 3 2
private static Reservation CreateReservation()
in FMLab/ODataConsoleApplication/Program.cs
32 2 1
private void btnDequeue_Click()
in FMLab/ConnectorClientApplication/mainForm.cs
29 3 2
public HttpResponseMessage SendPostRequest()
in FMLab/ConnectorClientApplication/Helper.cs
25 2 4
private static Customer CreateCustomer()
in FMLab/ODataConsoleApplication/Program.cs
24 2 0
public static bool CheckDriversLicense()
in FMLab/DriversLicenseChecker.cs
20 3 1
private static void GetAllCustomers()
in FMLab/ODataConsoleApplication/Program.cs
16 2 0
private static void GetAllCustomers()
in FMLab/Odata4ConsoleApplication/Program.cs
16 2 0
private void btnEnqueue_Click()
in FMLab/ConnectorClientApplication/mainForm.cs
14 2 2
image.onload = function()
in FMLab/TaskRecorderScreenshot/screenshot.js
12 1 0
public HttpResponseMessage SendRequest()
in FMLab/ConnectorClientApplication/Helper.cs
11 1 1
private static SVC_ODataPersonView_DE CreateExchange()
in FMLab/ODataConsoleApplication/Program.cs
10 1 0