microsoft / SqlNexus
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 661 units with 15,010 lines of code in units (71.5% of code).
    • 19 very long units (5,834 lines of code)
    • 26 long units (1,775 lines of code)
    • 112 medium size units (3,467 lines of code)
    • 135 small units (1,955 lines of code)
    • 369 very small units (1,979 lines of code)
38% | 11% | 23% | 13% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs38% | 11% | 23% | 13% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sqlnexus42% | 10% | 21% | 12% | 13%
RowsetImportEngine33% | 15% | 27% | 13% | 9%
ReadTraceNexusImporter0% | 48% | 19% | 26% | 5%
NexusInterfaces0% | 17% | 54% | 12% | 15%
sqlnexus/ClickOnce0% | 0% | 56% | 11% | 31%
PerfmonImporter0% | 0% | 33% | 51% | 14%
BulkLoadEx0% | 0% | 0% | 42% | 57%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private bool DrillThrough()
in sqlnexus/fmNexus.cs
1537 156 2
private void InitializeComponent()
in sqlnexus/fmNexus.Designer.cs
1058 2 0
528 1 0
public static bool GetReportParameters()
in sqlnexus/fmReportParameters.cs
345 63 4
private void DoImport()
in sqlnexus/fmImport.cs
309 38 0
private void InitializeComponent()
in sqlnexus/fmImport.Designer.cs
212 1 0
private void ProcessFile()
in RowsetImportEngine/TextRowsetImporter.cs
198 52 0
private bool ReadRowsetPropertiesFromXml()
in RowsetImportEngine/TextRowsetImporter.cs
191 52 2
private bool ReadRowsetPropertiesFromXml()
in RowsetImportEngine/TextRowsetImporter2.cs
168 47 2
private void InitializeComponent()
in sqlnexus/fmCustomRowset.Designer.cs
166 1 0
public static bool GetReportParameters()
in sqlnexus/fmParameters.cs
159 29 2
private void ProcessFile()
in RowsetImportEngine/TextRowsetImporter2.cs
158 43 0
private void btNext_Click()
in sqlnexus/fmMain.cs
126 15 2
private void fmNexus_Load()
in sqlnexus/fmNexus.cs
126 19 2
private void fmNexus_Load()
in sqlnexus/fmnexus.as.resource.cs
121 14 2
private void ExportReport()
in sqlnexus/fmnexus.as.resource.cs
112 12 2
public void SelectLoadReport()
in sqlnexus/fmnexus.as.resource.cs
111 16 3
private void InitializeComponent()
in sqlnexus/fmPBReports.Designer.cs
105 1 0
public void SelectLoadReport()
in sqlnexus/fmNexus.cs
104 12 3
public bool ExtractReadTraceReports()
in ReadTraceNexusImporter/ReadTraceNexusImporter.cs
92 13 0