facebookresearch / Replica-Dataset
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 40 units with 1,087 lines of code in units (57.9% of code).
    • 3 very long units (419 lines of code)
    • 4 long units (276 lines of code)
    • 6 medium size units (188 lines of code)
    • 6 small units (98 lines of code)
    • 21 very small units (106 lines of code)
38% | 25% | 17% | 9% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp45% | 29% | 14% | 5% | 4%
h0% | 0% | 35% | 31% | 33%
frag0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ReplicaSDK/src78% | 0% | 0% | 18% | 3%
ReplicaSDK/ptex30% | 43% | 21% | 0% | 4%
ReplicaSDK/include0% | 0% | 35% | 31% | 33%
ReplicaSDK/shaders0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void PLYParse()
in ReplicaSDK/ptex/PLYParser.cpp
194 44 2
int main()
in ReplicaSDK/src/viewer.cpp
113 18 2
int main()
in ReplicaSDK/src/render.cpp
112 10 2
std::vector PTexMesh::SplitMesh()
in ReplicaSDK/ptex/PTexLib.cpp
98 18 2
void PTexMesh::LoadAtlasData()
in ReplicaSDK/ptex/PTexLib.cpp
69 9 1
void EGLCtx::PrintInformation()
in ReplicaSDK/ptex/EGL.cpp
55 12 0
void PTexMesh::CalculateAdjacency()
in ReplicaSDK/ptex/PTexLib.cpp
54 11 2
void PTexMesh::LoadMeshData()
in ReplicaSDK/ptex/PTexLib.cpp
46 6 1
void PTexMesh::RenderWireframe()
in ReplicaSDK/ptex/PTexLib.cpp
34 7 2
void PTexMesh::RenderSubMesh()
in ReplicaSDK/ptex/PTexLib.cpp
30 1 3
void Render()
in ReplicaSDK/include/MirrorRenderer.h
28 2 4
void PTexMesh::RenderSubMeshDepth()
in ReplicaSDK/ptex/PTexLib.cpp
27 2 4
void CaptureReflection()
in ReplicaSDK/include/MirrorRenderer.h
23 4 6
void Draw()
in ReplicaSDK/include/MirrorRenderer.h
19 1 2
inline Eigen::MatrixXd EigenMatrixFromJson()
in ReplicaSDK/src/MirrorSurface.cpp
19 6 1
void MirrorSurface::GenerateMask()
in ReplicaSDK/src/MirrorSurface.cpp
18 5 3
bool MirrorSurface::InBoundary()
in ReplicaSDK/src/MirrorSurface.cpp
16 4 1
bool checkGLVersion()
in ReplicaSDK/include/GLCheck.h
15 3 0
bool InView()
in ReplicaSDK/include/MirrorRenderer.h
11 6 2
Eigen::Matrix4f GetReflectionMatrix()
in ReplicaSDK/include/MirrorRenderer.h
9 1 1