microsoft / glTF-SDK
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 476 units with 5,576 lines of code in units (35.6% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (379 lines of code)
    • 62 medium size units (1,912 lines of code)
    • 116 small units (1,708 lines of code)
    • 292 very small units (1,577 lines of code)
0% | 6% | 34% | 30% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 10% | 38% | 29% | 21%
h0% | 0% | 25% | 32% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
GLTFSDK/Source0% | 11% | 33% | 32% | 23%
GLTFSDK/Inc0% | 0% | 25% | 32% | 41%
GLTFSDK.Samples/Deserialize0% | 0% | 94% | 0% | 5%
GLTFSDK.Samples/Serialize0% | 0% | 93% | 0% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
rapidjson::Value SerializeMaterial()
in GLTFSDK/Source/Serialize.cpp
80 16 4
Material ParseMaterial()
in GLTFSDK/Source/Deserialize.cpp
69 12 2
void BufferBuilder::AddAccessors()
in GLTFSDK/Source/BufferBuilder.cpp
64 16 6
rapidjson::Value SerializeAccessor()
in GLTFSDK/Source/Serialize.cpp
59 9 4
Camera ParseCamera()
in GLTFSDK/Source/Deserialize.cpp
54 8 2
void GLBResourceReader::Init()
in GLTFSDK/Source/GLBResourceReader.cpp
53 10 0
void SerializeTriangle()
in GLTFSDK.Samples/Serialize/Source/main.cpp
50 6 1
rapidjson::Value SerializeNode()
in GLTFSDK/Source/Serialize.cpp
49 10 4
void PrintInfo()
in GLTFSDK.Samples/Deserialize/Source/main.cpp
47 5 1
Accessor ParseAccessor()
in GLTFSDK/Source/Deserialize.cpp
47 7 2
void PrintResourceInfo()
in GLTFSDK.Samples/Deserialize/Source/main.cpp
45 8 2
void ValidateVertexCount()
in GLTFSDK/Source/Validation.cpp
45 14 3
void PrintDocumentInfo()
in GLTFSDK.Samples/Deserialize/Source/main.cpp
44 6 1
44 8 2
void TraverseDepthFirst()
in GLTFSDK/Inc/GLTFSDK/Traverse.h
43 4 3
void ReadBinaryDataUri()
in GLTFSDK/Inc/GLTFSDK/GLTFResourceReader.h
42 7 3
void ReadSparseBinaryData()
in GLTFSDK/Inc/GLTFSDK/GLTFResourceReader.h
42 8 3
rapidjson::Value SerializeCamera()
in GLTFSDK/Source/Serialize.cpp
42 5 4
std::vector ReadSparseAccessor()
in GLTFSDK/Inc/GLTFSDK/GLTFResourceReader.h
39 7 2
inline void Base64Decode()
in GLTFSDK/Inc/GLTFSDK/ResourceReaderUtils.h
39 8 3