microsoft / MixedRealityLearning
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 10,558 units with 159,007 lines of code in units (12.6% of code).
    • 80 very long units (11,095 lines of code)
    • 387 long units (25,941 lines of code)
    • 1,583 medium size units (48,450 lines of code)
    • 2,675 small units (39,381 lines of code)
    • 5,833 very small units (34,140 lines of code)
6% | 16% | 30% | 24% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs6% | 16% | 30% | 24% | 21%
js0% | 0% | 0% | 50% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Azure Cloud Tutorials/Assets/MRTK6% | 17% | 30% | 25% | 20%
PC Holographic Remoting/Assets/MRTK6% | 16% | 30% | 25% | 20%
MRTK Tutorials/Assets/Photon12% | 13% | 33% | 21% | 18%
Azure Cloud Tutorials/Assets/MRTK.Tutorials.AzureCloudServices5% | 10% | 30% | 23% | 28%
Azure Cloud Tutorials/Assets/AzureSpatialAnchors.SDK0% | 14% | 12% | 17% | 55%
MRTK Tutorials/Assets/MRTK.Tutorials.AzureSpatialAnchors0% | 0% | 48% | 21% | 29%
MRTK Tutorials/Assets/MRTK.Tutorials.GettingStarted0% | 0% | 34% | 18% | 46%
AzureFunction/TrackedObjectsService/Data0% | 0% | 52% | 20% | 27%
PC Holographic Remoting/Assets/MRTK.Tutorials.PCHolographicRemoting0% | 0% | 0% | 74% | 25%
MRTK Tutorials/Assets/MRTK.Tutorials.MultiUserCapabilities0% | 0% | 0% | 27% | 72%
BotComposerProject/TrackedObjectsBot/scripts0% | 0% | 0% | 50% | 50%
AzureFunction/TrackedObjectsService0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void RenderInteractionList()
in Azure Cloud Tutorials/Assets/MRTK/Core/Inspectors/ControllerPopupWindow.cs
374 79 2
private void RenderInteractionList()
in PC Holographic Remoting/Assets/MRTK/Core/Inspectors/ControllerPopupWindow.cs
374 79 2
public virtual void OnOperationResponse()
in MRTK Tutorials/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs
262 63 1
internal static void ExecuteRpc()
in MRTK Tutorials/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs
255 59 2
protected override void OnEnable()
in Azure Cloud Tutorials/Assets/MRTK/Core/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs
207 14 0
protected override void OnEnable()
in PC Holographic Remoting/Assets/MRTK/Core/Inspectors/Profiles/MixedRealityToolkitConfigurationProfileInspector.cs
207 14 0
public override void OnInspectorGUI()
in Azure Cloud Tutorials/Assets/MRTK/SDK/Features/UX/Scripts/Buttons/ButtonIconSet.cs
203 25 0
public override void OnInspectorGUI()
in PC Holographic Remoting/Assets/MRTK/SDK/Features/UX/Scripts/Buttons/ButtonIconSet.cs
203 25 0
private static void OnEvent()
in MRTK Tutorials/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs
194 53 1
public virtual void OnStatusChanged()
in MRTK Tutorials/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs
191 53 1
private void RenderControllerList()
in Azure Cloud Tutorials/Assets/MRTK/Core/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs
185 39 1
private void RenderControllerList()
in PC Holographic Remoting/Assets/MRTK/Core/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs
185 39 1
public static void DrawProperty()
in Azure Cloud Tutorials/Assets/MRTK/Core/Inspectors/PropertyDrawers/SceneInfoDrawer.cs
169 31 5
public static void DrawProperty()
in PC Holographic Remoting/Assets/MRTK/Core/Inspectors/PropertyDrawers/SceneInfoDrawer.cs
169 31 5
public override void OnInspectorGUI()
in MRTK Tutorials/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs
161 20 0
public override void OnInspectorGUI()
in Azure Cloud Tutorials/Assets/MRTK/SDK/Inspectors/UX/Interactable/ButtonConfigHelperInspector.cs
151 24 0
public override void OnInspectorGUI()
in PC Holographic Remoting/Assets/MRTK/SDK/Inspectors/UX/Interactable/ButtonConfigHelperInspector.cs
151 24 0
private void FindPlacementPlane()
in Azure Cloud Tutorials/Assets/MRTK/SDK/Features/Utilities/Solvers/SurfaceMagnetism.cs
148 36 11
private void FindPlacementPlane()
in PC Holographic Remoting/Assets/MRTK/SDK/Features/Utilities/Solvers/SurfaceMagnetism.cs
148 36 11
public static JSONNode Parse()
in Azure Cloud Tutorials/Assets/MRTK.Tutorials.AzureCloudServices/Scripts/BotDirectLine/SimpleJSON.cs
144 42 1