microsoft / MIEngine
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 1,975 units with 27,710 lines of code in units (65.4% of code).
    • 22 very long units (3,307 lines of code)
    • 68 long units (4,462 lines of code)
    • 254 medium size units (7,704 lines of code)
    • 369 small units (5,394 lines of code)
    • 1,262 very small units (6,843 lines of code)
11% | 16% | 27% | 19% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs12% | 15% | 27% | 19% | 24%
csx0% | 48% | 37% | 6% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/OpenDebugAD728% | 20% | 22% | 13% | 15%
src/MIDebugEngine13% | 17% | 28% | 17% | 23%
src/MICore4% | 10% | 34% | 23% | 26%
src/AndroidDebugLauncher18% | 11% | 35% | 20% | 13%
src/tools45% | 0% | 24% | 12% | 17%
src/SSHDebugPS3% | 13% | 28% | 21% | 33%
src/WindowsDebugLauncher0% | 60% | 12% | 13% | 13%
src/MIDebugPackage0% | 63% | 0% | 32% | 3%
src/SSHDebugTests0% | 48% | 15% | 17% | 17%
src/IOSDebugLauncher0% | 49% | 23% | 16% | 10%
tools0% | 48% | 37% | 6% | 7%
tools/iOS0% | 49% | 42% | 0% | 8%
src/DebugEngineHost0% | 0% | 28% | 31% | 40%
src/JDbg0% | 0% | 18% | 33% | 48%
src/DebugEngineHost.VSCode0% | 0% | 5% | 30% | 64%
src/DebugEngineHost.Stub0% | 0% | 0% | 0% | 100%
src/MakePIAPortable0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public DebuggedProcess()
in src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs
314 56 8
private async Task HandleBreakModeEvent()
in src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs
267 53 2
private LaunchOptions SetupForDebuggingWorker()
in src/AndroidDebugLauncher/Launcher.cs
244 36 1
194 30 1
176 29 1
public static LaunchOptions GetInstance()
in src/MICore/LaunchOptions.cs
157 30 9
protected override void HandleAttachRequestAsync()
in src/OpenDebugAD7/AD7DebugSession.cs
154 27 1
protected override void HandleLaunchRequestAsync()
in src/OpenDebugAD7/AD7DebugSession.cs
147 22 1
private static int TransformIL()
in src/tools/MakePIAPortableTool/MakePIAPortableTool.cs
143 26 2
public void SetFrameInfo()
in src/MIDebugEngine/AD7.Impl/AD7StackFrame.cs
135 35 3
protected override void HandleInitializeRequestAsync()
in src/OpenDebugAD7/AD7DebugSession.cs
134 10 1
private string InterpolateToken()
in src/OpenDebugAD7/Tracepoint.cs
130 27 6
public override async void Init()
in src/MICore/Transports/RunInTerminalTransport.cs
124 9 4
protected override void HandleEvaluateRequestAsync()
in src/OpenDebugAD7/AD7DebugSession.cs
123 22 1
internal async Task Eval()
in src/MIDebugEngine/Engine.Impl/Variables.cs
120 32 3
private async Task UpdateCategory()
in src/MIDebugEngine/Engine.Impl/ExceptionManager.cs
114 22 3
private static int Main()
in src/OpenDebugAD7/OpenDebug/Program.cs
112 23 1
private async Task InternalFetchChildren()
in src/MIDebugEngine/Engine.Impl/Variables.cs
107 18 0
105 16 1
private void RefreshContainersListInternal()
in src/SSHDebugPS/UI/ViewModels/ContainerPickerViewModel.cs
105 17 0