microsoft / MixedRealityToolkit
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 7,316 units with 120,469 lines of code in units (30.9% of code).
    • 144 very long units (29,424 lines of code)
    • 223 long units (15,424 lines of code)
    • 960 medium size units (29,526 lines of code)
    • 1,592 small units (23,025 lines of code)
    • 4,397 very small units (23,070 lines of code)
24% | 12% | 24% | 19% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp20% | 15% | 27% | 20% | 16%
c66% | 11% | 14% | 4% | 1%
h9% | 7% | 21% | 25% | 37%
cc0% | 10% | 41% | 30% | 18%
hpp0% | 1% | 37% | 20% | 40%
cs0% | 0% | 12% | 25% | 61%
java0% | 0% | 36% | 24% | 39%
inl0% | 0% | 11% | 14% | 74%
hh0% | 0% | 0% | 39% | 60%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Sharing22% | 9% | 26% | 21% | 20%
SpatialUnderstanding28% | 17% | 19% | 16% | 17%
SpatialInput25% | 18% | 26% | 12% | 16%
SpatialMapping13% | 16% | 34% | 19% | 16%
Input0% | 30% | 29% | 6% | 32%
GpuStats0% | 16% | 44% | 27% | 11%
EditorMotionControllerDLL0% | 0% | 72% | 27% | 0%
SpectatorViewPlugin0% | 0% | 71% | 15% | 12%
DotNetNativeWorkaround0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int cc_binary_string()
in Sharing/Src/External/zint-2.4.3/src/backend/composite.c
788 366 7
int ps_plot()
in Sharing/Src/External/zint-2.4.3/src/backend/ps.c
661 109 1
int rss_binary_string()
in Sharing/Src/External/zint-2.4.3/src/backend/rss.c
605 267 3
int c1_encode()
in Sharing/Src/External/zint-2.4.3/src/backend/code1.c
593 268 4
int aztec_text_process()
in Sharing/Src/External/zint-2.4.3/src/backend/aztec.c
550 233 4
int aztec()
in Sharing/Src/External/zint-2.4.3/src/backend/aztec.c
523 240 3
int render_plot()
in Sharing/Src/External/zint-2.4.3/src/backend/render.c
511 139 3
int svg_plot()
in Sharing/Src/External/zint-2.4.3/src/backend/svg.c
511 111 1
Bool HMapMeshInfos3D::ProcessBubbleAlgorithm()
in SpatialUnderstanding/Src/PlaySpace/PlaySpace_ScanMesh_W.cpp
508 189 3
void Playspace_Mesh::SimplifyTri2()
in SpatialUnderstanding/Src/PlaySpace/PlaySpace_Mesh_W.cpp
484 126 3
int code_one()
in Sharing/Src/External/zint-2.4.3/src/backend/code1.c
448 89 3
int code16k()
in Sharing/Src/External/zint-2.4.3/src/backend/code16k.c
382 144 3
HRESULT CreateTextureFromDDS()
in SpatialInput/External/DirectXTK/DDSTextureLoader.cpp
370 91 3
bool TinyGLTF::LoadFromString()
in SpatialInput/External/tiny_gltf.h
366 122 6
void Playspace_Mesh::PlanarFilter_AccurateNew()
in SpatialUnderstanding/Src/PlaySpace/PlaySpace_Mesh_W.cpp
359 57 0
int png_plot()
in Sharing/Src/External/zint-2.4.3/src/backend/png.c
352 88 3
int dm200encode()
in Sharing/Src/External/zint-2.4.3/src/backend/dmatrix.c
348 102 5
int Version::buildVersions()
in Sharing/Src/External/zxing-cpp/src/core/src/zxing/qrcode/Version.cpp
337 1 0
int gm_encode()
in Sharing/Src/External/zint-2.4.3/src/backend/gridmtx.c
336 192 4
Bool BlindDetector::ComputeBlindZone()
in SpatialUnderstanding/Src/PlaySpace/PlaySpace_ScanMesh_W.cpp
332 83 2