fbsamples / oculus-networked-physics-sample
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,501 units with 20,317 lines of code in units (20.2% of code).
    • 9 very long units (1,402 lines of code)
    • 47 long units (3,474 lines of code)
    • 154 medium size units (4,954 lines of code)
    • 332 small units (4,852 lines of code)
    • 959 very small units (5,635 lines of code)
6% | 17% | 24% | 23% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs6% | 17% | 24% | 23% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Assets/Oculus/VR8% | 15% | 29% | 25% | 20%
Assets/Scripts5% | 28% | 21% | 25% | 18%
Assets/OculusPlatform/Scripts6% | 0% | 9% | 17% | 67%
Assets/OvrAvatar/Scripts0% | 0% | 41% | 31% | 26%
Assets/OculusPlatform/Editor0% | 0% | 52% | 9% | 38%
Assets/Scripts/Editor0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void Update()
in Networked Physics/Assets/Oculus/VR/Scripts/OVRManager.cs
263 69 0
static void CheckStaticCommonIssues()
in Networked Physics/Assets/Oculus/VR/Scripts/OVRLint.cs
246 49 0
internal static Message ParseMessageHandle()
in Networked Physics/Assets/OculusPlatform/Scripts/Message.cs
192 96 1
protected void DeterminePrediction()
in Networked Physics/Assets/Scripts/Common.cs
155 29 12
public virtual void UpdateMovement()
in Networked Physics/Assets/Oculus/VR/Scripts/Util/OVRPlayerController.cs
114 42 0
static void CheckStaticAndroidIssues()
in Networked Physics/Assets/Oculus/VR/Scripts/OVRLint.cs
113 23 0
public void ReadStateUpdatePacket()
in Networked Physics/Assets/Scripts/PacketSerializer.cs
112 8 14
public static void Quantize()
in Networked Physics/Assets/Scripts/AvatarState.cs
106 5 2
private static void EnablePluginPackage()
in Networked Physics/Assets/Oculus/VR/Editor/OVRPluginUpdater.cs
101 10 1
public static void PredictBallistic()
in Networked Physics/Assets/Scripts/Prediction.cs
100 20 19
public static void QuaternionToSmallestThree()
in Networked Physics/Assets/Scripts/Snapshot.cs
99 12 5
void OnGUI()
in Networked Physics/Assets/Oculus/VR/Scripts/OVRLint.cs
98 24 0
public void WriteStateUpdatePacket()
in Networked Physics/Assets/Scripts/PacketSerializer.cs
98 8 14
public class SequenceBuffer32 where T : new()
in Networked Physics/Assets/Scripts/Network.cs
97 9 0
protected void UpdateCameraFramePlaneObject()
in Networked Physics/Assets/Oculus/VR/Scripts/Composition/OVRCameraComposition.cs
92 17 3
bool DecodePrediction()
in Networked Physics/Assets/Scripts/JitterBuffer.cs
91 8 10
protected bool DecodePrediction()
in Networked Physics/Assets/Scripts/Common.cs
91 8 10
void read_avatar_state()
in Networked Physics/Assets/Scripts/PacketSerializer.cs
88 3 2
private void Awake()
in Networked Physics/Assets/Oculus/VR/Scripts/OVRManager.cs
87 21 0
public void Process()
in Networked Physics/Assets/Oculus/VR/Scripts/OVRHaptics.cs
84 22 0