ScpToolkit
Unit Size

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 835 units with 14,381 lines of code in units (23.9% of code).
    • 16 very long units (3,474 lines of code)
    • 33 long units (2,417 lines of code)
    • 104 medium size units (3,338 lines of code)
    • 161 small units (2,383 lines of code)
    • 521 very small units (2,769 lines of code)
24% | 16% | 23% | 16% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
cs16% | 16% | 24% | 18% | 23%
cpp49% | 16% | 20% | 11% | 3%
h65% | 27% | 7% | 0% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Logical Component
primary logical decomposition
Lilypad49% | 11% | 24% | 9% | 4%
ScpControl12% | 18% | 24% | 22% | 23%
ScpMonitor45% | 5% | 21% | 10% | 17%
XInput_Scp49% | 25% | 8% | 15% | <1%
ScpInstaller61% | 0% | 25% | 7% | 5%
ScpServer50% | 0% | 20% | 17% | 11%
ScpUser60% | 24% | 12% | 0% | 1%
ScpDriverInstaller0% | 38% | 24% | 16% | 20%
ScpService0% | 52% | 15% | 6% | 24%
ScpXInputBridge0% | 38% | 37% | 5% | 17%
ScpPair0% | 40% | 38% | 0% | 20%
ScpProfiler0% | 17% | 18% | 40% | 23%
ScpControl.Shared0% | 0% | 31% | 9% | 58%
ScpGamepadAnalyzer0% | 0% | 72% | 0% | 27%
ScpCleanWipe0% | 0% | 57% | 0% | 42%
ScpSettings0% | 0% | 19% | 24% | 56%
ScpTrayApp0% | 0% | 13% | 28% | 57%
ScpLauncher0% | 0% | 0% | 0% | 100%
ScpControlPanel0% | 0% | 0% | 0% | 100%
Legend:
101+
51-100
21-50
11-20
1-10
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
private void InitializeComponent()
in ScpMonitor/ProfilesForm.Designer.cs
434 1 0
private void HicWorker()
in ScpControl/Bluetooth/BthDongle.Tasks.cs
403 94 1
BOOLEAN FillDeviceInfo()
in XInput_Scp/pnp.cpp
316 52 1
INT_PTR CALLBACK DialogProc()
in Lilypad/Config.cpp
313 88 4
INT_PTR CALLBACK GeneralDialogProc()
in Lilypad/Config.cpp
261 67 4
private void InitializeComponent()
in ScpServer/ScpForm.Designer.cs
228 1 0
void InitializeComponent()
in ScpUser/ScpPad.h
222 1 1
void SelChanged()
in Lilypad/Config.cpp
206 65 2
private void ParseBufferDs3()
in ScpControl/Bluetooth/BthDongle.Tasks.cs
177 25 2
int LoadSettings()
in Lilypad/Config.cpp
170 54 2
private void InitializeComponent()
in ScpInstaller/ScpForm.Designer.cs
147 1 0
private void InitializeComponent()
in ScpMonitor/ScpForm.Designer.cs
139 1 0
private async void btnInstall_Click()
in ScpInstaller/ScpForm.cs
125 24 2
BOOLEAN FindKnownHidDevices()
in XInput_Scp/pnp.cpp
115 12 2
private static bool PnpUtilHelper()
in ScpControl/Driver/PNPUtilLib/PNPUtil.cs
111 20 3
private void ParseBufferDs4()
in ScpControl/Bluetooth/BthDongle.Tasks.cs
107 22 3
protected override void Process()
in ScpControl/Usb/Ds3/UsbDs3.cs
98 24 1
public XINPUT_GAMEPAD Parse()
in ScpControl/BusDevice.cs
97 37 1
void InitializeComponent()
in ScpUser/ScpExtended.h
91 1 1
public override bool Start()
in ScpControl/Usb/UsbHub.cs
90 21 0
private void OnUsbDeviceAddedOrRemoved()
in ScpDriverInstaller/MainWindow.xaml.cs
88 17 0
protected override void Process()
in ScpControl/Bluetooth/Ds3/BthDs3.cs
88 29 1
public static uint XInputGetState()
in ScpXInputBridge/XInputDll.Exports.cs
85 9 2
private async void InstallVBusOnClick()
in ScpDriverInstaller/MainWindow.xaml.cs
84 9 2
int BindCommand()
in Lilypad/Config.cpp
83 30 8
int SaveSettings()
in Lilypad/Config.cpp
82 17 1
protected override void Process()
in ScpControl/Bluetooth/Ds4/BthDs4.cs
82 22 1
protected override void ParseHidReport()
in ScpControl/Usb/Gamepads/UsbGameStopPcAdvanced.cs
80 13 1
private async void InstallWindowsServiceOnClick()
in ScpDriverInstaller/MainWindow.xaml.cs
79 8 2
VOID CloseHidDevice()
in XInput_Scp/pnp.cpp
79 16 1
private void InitializeComponent()
in ScpPair/ScpForm.Designer.cs
77 1 0
BOOLEAN OpenHidDevice()
in XInput_Scp/pnp.cpp
75 13 6
protected override void ParseHidReport()
in ScpControl/Usb/Ds3/Replica/UsbDs3Afterglow.cs
73 11 1
BOOL LoadApi()
in XInput_Scp/XInput_SCP.cpp
72 28 1
public SCP_EXTN GetExtended()
in ScpControl/ScpProxy.cs
71 5 1
private void Parse()
in ScpMonitor/ProfilesForm.cs
68 26 2
public override DsPadId Notify()
in ScpControl/Usb/UsbHub.cs
68 15 3
protected override void ParseHidReport()
in ScpControl/Usb/Gamepads/UsbShanWanWirelessGamepad.cs
65 11 1
public override void ParseHidReport()
in ScpControl/Bluetooth/Ds4/BthDs4.cs
65 18 1
private int ServiceControlHandler()
in ScpService/Ds3Service.cs
63 14 4
protected override void ParseHidReport()
in ScpControl/Usb/Gamepads/UsbLsiLogicGamepad.cs
61 10 1
void UpdatePadList()
in Lilypad/Config.cpp
60 12 1
public List EnumeratePackages()
in ScpControl/Driver/PNPUtilLib/PNPUtil.cs
59 11 0
public override bool Open()
in ScpControl/Usb/Ds3/UsbDs3.cs
59 7 1
private async void InstallDsOnClick()
in ScpDriverInstaller/MainWindow.xaml.cs
58 7 2
protected override void OnStart()
in ScpService/Ds3Service.cs
58 4 1
protected virtual bool GetDeviceInstance()
in ScpControl/ScpDevice.cs
56 7 1
private IniConfig()
in ScpControl/Utilities/IniConfig.cs
52 4 0
private void ProxyOnNativeFeedReceived()
in ScpProfiler/MainWindow.xaml.cs
51 5 2
protected override void OnDeviceArrival()
in ScpControl/RootHub.cs
50 12 2