microsoft / DWScripter
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 77 units with 2,533 lines of code in units (78.6% of code).
    • 4 very long units (721 lines of code)
    • 16 long units (1,098 lines of code)
    • 12 medium size units (332 lines of code)
    • 13 small units (181 lines of code)
    • 32 very small units (201 lines of code)
28% | 43% | 13% | 7% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs28% | 43% | 13% | 7% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
PDWScripter24% | 45% | 13% | 8% | 8%
DWScripter64% | 26% | 9% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void compareDML()
in src/PDWScripter/PDWscripter.cs
212 27 5
private void getSourceColumns()
in src/PDWScripter/PDWscripter.cs
196 36 2
static void Main()
in src/DWScripter/Program.cs
177 45 1
public string GenerateColumnDefinition()
in src/PDWScripter/GenerateScripts.cs
136 28 1
private void getDML()
in src/PDWScripter/PDWscripter.cs
92 11 2
public void getDbstructure()
in src/PDWScripter/PDWscripter.cs
89 13 3
private void CompareDbTables()
in src/PDWScripter/PDWscripter.cs
82 12 5
private void getNonclusteredIndexes()
in src/PDWScripter/PDWscripter.cs
82 12 2
private void getPartitioning()
in src/PDWScripter/PDWscripter.cs
81 10 2
private void getPartitioningGlobal()
in src/PDWScripter/PDWscripter.cs
78 9 0
72 15 1
private void getClusteredIndex()
in src/PDWScripter/PDWscripter.cs
72 14 2
private void CompareSchemas()
in src/PDWScripter/PDWscripter.cs
69 9 5
private void getStats()
in src/PDWScripter/PDWscripter.cs
62 9 2
public PDWscripter()
in src/PDWScripter/PDWscripter.cs
55 5 11
private void getNonclusteredIndexesGlobal()
in src/PDWScripter/PDWscripter.cs
55 7 0
private void getSourceColumnsGlobal()
in src/PDWScripter/PDWscripter.cs
53 8 0
private void getStatsGlobal()
in src/PDWScripter/PDWscripter.cs
53 7 0
private void getDDL()
in src/PDWScripter/PDWscripter.cs
52 6 2
private void getClusteredIndexGlobal()
in src/PDWScripter/PDWscripter.cs
51 7 0