microsoft / 2LCS
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 284 units with 6,725 lines of code in units (79.7% of code).
    • 9 very long units (2,300 lines of code)
    • 16 long units (1,105 lines of code)
    • 48 medium size units (1,502 lines of code)
    • 70 small units (1,003 lines of code)
    • 141 very small units (815 lines of code)
34% | 16% | 22% | 14% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs34% | 16% | 22% | 14% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
2LCS/Forms40% | 18% | 16% | 12% | 11%
2LCS0% | 6% | 50% | 27% | 15%
2LCS/Cache0% | 0% | 52% | 26% | 20%
2LCS/Utils0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in 2LCS/Forms/MainForm.Designer.cs
1030 1 0
345 28 2
private void InitializeComponent()
in 2LCS/Forms/ChoosePackage.Designer.cs
170 1 0
private void InitializeComponent()
in 2LCS/Forms/Parameters.Designer.cs
159 1 0
private void InitializeComponent()
in 2LCS/Forms/UpcomingUpdates.Designer.cs
144 1 0
private void InitializeComponent()
in 2LCS/Forms/ChooseProject.Designer.cs
126 1 0
private void InitializeComponent()
in 2LCS/Forms/ChooseMachine.Designer.cs
111 1 0
private void InitializeComponent()
in 2LCS/Forms/CustomLinks.Designer.cs
110 1 0
105 17 2
private void InitializeComponent()
in 2LCS/Forms/ChooseNSG.Designer.cs
95 1 0
private void InitializeComponent()
in 2LCS/Forms/RDPConnect.Designer.cs
91 1 0
private void InitializeComponent()
in 2LCS/Forms/BuildInfoDetails.Designer.cs
90 1 0
83 5 2
private void InitializeComponent()
in 2LCS/Forms/AvailableKBs.Designer.cs
81 1 0
private void InitializeComponent()
in 2LCS/Forms/EnvironmentChanges.Designer.cs
74 1 0
private void InitializeComponent()
in 2LCS/Forms/AddNSG.Designer.cs
71 1 0
68 17 1
65 5 2
internal List GetRdpConnectionDetails()
in 2LCS/HttpClientHelper.cs
62 6 1
61 9 2