microsoft / ShaderConductor
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 48 units with 1,375 lines of code in units (56.6% of code).
    • 3 very long units (546 lines of code)
    • 4 long units (294 lines of code)
    • 8 medium size units (270 lines of code)
    • 10 small units (156 lines of code)
    • 23 very small units (109 lines of code)
39% | 21% | 19% | 11% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp48% | 12% | 21% | 10% | 6%
py0% | 51% | 13% | 21% | 13%
cs0% | 91% | 0% | 0% | 8%
hpp0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Source/Core41% | 16% | 22% | 10% | 7%
Source/Tools100% | 0% | 0% | 0% | 0%
ROOT0% | 51% | 13% | 21% | 13%
Source/Wrapper0% | 41% | 33% | 14% | 9%
Include/ShaderConductor0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Compiler::ResultDesc CrossCompile()
in Source/Core/ShaderConductor.cpp
225 56 4
int main()
in Source/Tools/ShaderConductorCmd.cpp
176 26 2
Compiler::ResultDesc CompileToBinary()
in Source/Core/ShaderConductor.cpp
145 24 4
def Build()
in BuildAll.py
94 11 8
void ShaderReflection()
in Source/Core/ShaderConductor.cpp
79 16 2
void Compiler::Compile()
in Source/Core/ShaderConductor.cpp
66 13 5
static void Main()
in Source/Wrapper/Program.cs
55 4 1
Compiler::ResultDesc Compiler::Disassemble()
in Source/Core/ShaderConductor.cpp
47 5 1
void Compile()
in Source/Wrapper/Native.cpp
44 4 4
void ConvertDxcResult()
in Source/Core/ShaderConductor.cpp
35 6 4
Compiler::ResultDesc ConvertBinary()
in Source/Core/ShaderConductor.cpp
33 10 4
std::wstring ShaderProfileName()
in Source/Core/ShaderConductor.cpp
32 7 2
Compiler::ResultDesc Compiler::Link()
in Source/Core/ShaderConductor.cpp
31 2 3
24 1 3
HRESULT STDMETHODCALLTYPE LoadSource()
in Source/Core/ShaderConductor.cpp
24 5 2
HRESULT STDMETHODCALLTYPE QueryInterface()
in Source/Core/ShaderConductor.cpp
19 3 2
void Disassemble()
in Source/Wrapper/Native.cpp
19 3 2
Blob DefaultLoadCallback()
in Source/Core/ShaderConductor.cpp
18 2 1
BOOL WINAPI DllMain()
in Source/Core/ShaderConductor.cpp
18 3 3
def Execute()
in BuildAll.py
16 2 1