microsoft / UVAtlas
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 644 units with 25,968 lines of code in units (70.8% of code).
    • 51 very long units (8,651 lines of code)
    • 120 long units (8,668 lines of code)
    • 183 medium size units (6,119 lines of code)
    • 115 small units (1,712 lines of code)
    • 175 very small units (818 lines of code)
33% | 33% | 23% | 6% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp35% | 35% | 22% | 5% | 1%
hpp0% | 14% | 36% | 35% | 14%
h0% | 7% | 32% | 10% | 49%
inl0% | 0% | 62% | 30% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
UVAtlas/isochart25% | 38% | 26% | 6% | 2%
UVAtlasTool65% | 18% | 8% | 5% | 1%
UVAtlas/geodesics72% | 0% | 9% | 5% | 12%
UVAtlas0% | 0% | 41% | 39% | 19%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int __cdecl wmain()
in UVAtlasTool/UVAtlas.cpp
923 207 2
HRESULT Mesh::ExportToSDKMESH()
in UVAtlasTool/Mesh.cpp
554 98 8
void CExactOneToAll::InternalRun()
in UVAtlas/geodesics/ExactOneToAll.cpp
387 73 0
HRESULT Mesh::ExportToCMO()
in UVAtlasTool/Mesh.cpp
291 69 3
void CApproximateOneToAll::CutHeapTopData()
in UVAtlas/geodesics/ApproximateOneToAll.cpp
279 58 1
void CExactOneToAll::IntersectWindow()
in UVAtlas/geodesics/ExactOneToAll.cpp
234 37 6
HRESULT CIsochartMesh::PackingOneChart()
in UVAtlas/isochart/packingcharts.cpp
229 22 3
inline static HRESULT FindChartPosition()
in UVAtlas/isochart/packingcharts.cpp
208 13 7
HRESULT CIsochartMesh::ProcessPlaneLikeShape()
in UVAtlas/isochart/meshpartitionchart.cpp
207 35 3
inline static HRESULT MergeBorders()
in UVAtlas/isochart/packingcharts.cpp
189 24 3
bool CIsochartMesh::OptimizeVertexStretchAroundCenter()
in UVAtlas/isochart/meshoptimizestretch.cpp
182 27 2
static void CalculateSegmentsIntersection()
in UVAtlas/isochart/isochartutil.cpp
171 20 7
HRESULT UVAtlasPartitionInt()
in UVAtlas/isochart/UVAtlas.cpp
170 29 1
static HRESULT ComputeIMTOnPixel()
in UVAtlas/isochart/imtcomputation.cpp
150 25 14
HRESULT CIsochartMesh::IsomapParameterlization()
in UVAtlas/isochart/isochartmesh.cpp
150 21 6
static HRESULT Accumulation()
in UVAtlas/isochart/imtcomputation.cpp
148 14 7
HRESULT CIsochartMesh::MergeAdjacentChart()
in UVAtlas/isochart/mergecharts.cpp
146 23 6
141 20 7
HRESULT CUVAtlasRepacker::GenerateNewBuffers()
in UVAtlas/isochart/UVAtlasRepacker.cpp
139 21 0
void CExactOneToAll::ProcessNewWindow()
in UVAtlas/geodesics/ExactOneToAll.cpp
136 23 1