microsoft / ManagedEsent
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 6,639 units with 71,855 lines of code in units (64.6% of code).
    • 21 very long units (4,334 lines of code)
    • 96 long units (6,369 lines of code)
    • 593 medium size units (17,763 lines of code)
    • 1,089 small units (16,009 lines of code)
    • 4,840 very small units (27,380 lines of code)
6% | 8% | 24% | 22% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs6% | 8% | 24% | 22% | 37%
py0% | 0% | 19% | 21% | 59%
cpp0% | 0% | 0% | 73% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Pixie17% | <1% | 10% | 23% | 47%
EsentInteropTests3% | 12% | 27% | 23% | 32%
EsentInterop5% | 5% | 22% | 20% | 46%
isam12% | 11% | 33% | 17% | 24%
isamunittests19% | 0% | 39% | 23% | 17%
EsentInteropSamples0% | 28% | 36% | 25% | 9%
EsentCollections0% | 18% | 31% | 21% | 28%
EsentCollectionsTests0% | 1% | 17% | 16% | 64%
Esedb0% | 0% | 19% | 21% | 59%
UWPSample0% | 0% | 32% | 18% | 48%
PixieSamples0% | 0% | 0% | 85% | 14%
EsentCollectionsSamples0% | 0% | 0% | 91% | 8%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static Scanner()
in Pixie/SqlScanner.cs
818 1 0
808 398 1
int Scan()
in Pixie/SqlScanner.cs
263 152 0
public void VerifyJetTablecreateEquality()
in EsentInteropTests/ContentEquatableTests.cs
185 1 0
public void VerifyJetRecsizeInequality()
in EsentInteropTests/EquatableTests.cs
184 3 0
private int RunTests()
in EsentInteropTests/EseInteropTestHelper.cs
148 27 1
private int RunTests()
in isamunittests/IsamTestHelper.cs
148 27 1
147 1 0
internal static IndexDefinition Load()
in isam/IndexDefinition.cs
145 10 3
public void VerifyJetTablecreateInequality()
in EsentInteropTests/ContentEquatableTests.cs
138 2 0
138 30 1
public void VerifyJetThreadstats2Inequality()
in EsentInteropTests/Windows10EquatableTests.cs
136 3 0
134 34 1
public static int TestRunnerMain()
in EsentInteropTests/EseInteropTestHelper.cs
132 27 1
public static int TestRunnerMain()
in isamunittests/IsamTestHelper.cs
132 27 1
static partial void FillParamTable()
in isam/config/DatabaseConfig.g.cs
127 1 0
private void ValidateTableDefinition()
in isam/TemporaryDatabase.cs
121 31 1
public void Setup()
in EsentInteropTests/ColumnInfoTests.cs
114 1 0
public void HowDoIDealWithMultivalues()
in EsentInteropTests/HowDoI.cs
107 7 0
public int JetEnumerateColumns()
in EsentInterop/JetApi.cs
106 16 4