microsoft / MCW-Serverless-architecture
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 22 units with 375 lines of code in units (57.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (252 lines of code)
    • 4 small units (61 lines of code)
    • 10 very small units (62 lines of code)
0% | 0% | 67% | 16% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 67% | 16% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/TollBooth/TollBooth0% | 0% | 61% | 20% | 18%
src/TollBooth/UploadImages0% | 0% | 89% | 0% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static void UploadImages()
in Hands-on lab/lab-files/src/TollBooth/UploadImages/Program.cs
45 5 1
private AsyncPolicyWrap DefineAndRetrieveResiliencyStrategy()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FindLicensePlateText.cs
38 3 0
public static async Task Run()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/ProcessImage.cs
34 3 4
public static async Task Run()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/ExportLicensePlates.cs
32 4 4
public async Task GenerateAndSaveCsv()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FileMethods.cs
30 2 1
private async Task MakeOCRRequest()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FindLicensePlateText.cs
30 3 1
static int Main()
in Hands-on lab/lab-files/src/TollBooth/UploadImages/Program.cs
22 2 1
private async Task Send()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/SendToEventGrid.cs
21 1 3
private static string GetLicensePlateTextFromResult()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FindLicensePlateText.cs
18 7 1
private static string RemoveSpecialCharacters()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FindLicensePlateText.cs
15 8 1
public List GetLicensePlatesToExport()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/DatabaseMethods.cs
14 1 0
public async Task MarkLicensePlatesAsExported()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/DatabaseMethods.cs
14 2 1
private static LicensePlateData ToLicensePlateData()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FileMethods.cs
9 1 1
public async Task SendLicensePlateData()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/SendToEventGrid.cs
9 2 1
private static string GenerateRandomFileName()
in Hands-on lab/lab-files/src/TollBooth/UploadImages/Program.cs
8 1 0
public FileMethods()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FileMethods.cs
6 1 1
private static ByteArrayContent GetImageHttpContent()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FindLicensePlateText.cs
6 1 1
private static string GetBlobNameFromUrl()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/ProcessImage.cs
6 1 1
public FindLicensePlateText()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/FindLicensePlateText.cs
5 1 2
public SendToEventGrid()
in Hands-on lab/lab-files/src/TollBooth/TollBooth/SendToEventGrid.cs
5 1 2