microsoft / HoloLensForCV
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 279 units with 5,349 lines of code in units (44.2% of code).
    • 6 very long units (868 lines of code)
    • 16 long units (1,187 lines of code)
    • 53 medium size units (1,749 lines of code)
    • 50 small units (729 lines of code)
    • 154 very small units (816 lines of code)
16% | 22% | 32% | 13% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp19% | 24% | 29% | 14% | 12%
cs0% | 10% | 54% | 10% | 24%
h0% | 0% | 42% | 7% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Shared/HoloLensForCV33% | 18% | 28% | 10% | 9%
Shared/Audio53% | 0% | 34% | 0% | 11%
Shared/Io29% | 0% | 27% | 21% | 21%
Shared/Rendering0% | 43% | 39% | 5% | 12%
Shared/Graphics0% | 30% | 32% | 21% | 15%
Tools/Recorder0% | 32% | 30% | 30% | 7%
Tools/StreamerVLC0% | 49% | 16% | 6% | 26%
Shared/Holographic0% | 31% | 18% | 26% | 24%
Tools/StreamerPV0% | 46% | 15% | 7% | 30%
Tools/ReceiverVLC0% | 19% | 45% | 9% | 24%
Tools/ReceiverPV0% | 0% | 64% | 11% | 24%
Shared/OpenCVHelpers0% | 0% | 63% | 36% | 0%
Shared/Debugging0% | 0% | 0% | 38% | 61%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
201 16 0
void MediaFrameReaderContext::FrameArrived()
in Shared/HoloLensForCV/MediaFrameReaderContext.cpp
190 17 2
void SensorFrameRecorderSink::Send()
in Shared/HoloLensForCV/SensorFrameRecorderSink.cpp
136 16 1
void CreateTarball()
in Shared/Io/Tar.cpp
127 5 4
HRESULT AudioStreamReader::Initialize()
in Shared/Audio/AudioStreamReader.cpp
110 27 1
HRESULT AudioFileReader::Initialize()
in Shared/Audio/AudioFileReader.cpp
104 26 1
void AppMain::OnUpdate()
in Tools/StreamerVLC/AppMain.cpp
99 9 2
void SensorFrameStreamingServer::Send()
in Shared/HoloLensForCV/SensorFrameStreamingServer.cpp
89 6 1
bool AppMainBase::Render()
in Shared/Holographic/AppMainBase.cpp
89 6 1
void AppMain::OnUpdate()
in Tools/StreamerPV/AppMain.cpp
83 5 2
void SlateMaterial::CreateDeviceDependentResources()
in Shared/Rendering/SlateMaterial.cpp
81 8 0
void MarkerRenderer::CreateDeviceDependentResources()
in Shared/Rendering/MarkerRenderer.cpp
79 2 0
void SlateRenderer::CreateDeviceDependentResources()
in Shared/Rendering/SlateRenderer.cpp
79 2 0
SensorType MediaFrameSourceGroup::GetSensorType()
in Shared/HoloLensForCV/MediaFrameSourceGroup.cpp
78 11 1
76 7 2
void Graphics::DeviceResources::CreateDeviceResources()
in Shared/Graphics/DeviceResources.cpp
74 4 0
Concurrency::task SensorFrameReceiver::ReceiveSensorFrameAsync()
in Shared/HoloLensForCV/SensorFrameReceiver.cpp
70 11 1
private async void OnServerConnectionEstablished()
in Tools/ReceiverVLC/MainPage.xaml.cs
62 8 1
62 5 0
void PolylineRenderer::CreateDeviceDependentResources()
in Shared/Rendering/PolylineRenderer.cpp
58 3 0