apple / swift-installer-scripts
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 14 units with 214 lines of code in units (8.0% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (130 lines of code)
    • 1 medium size units (23 lines of code)
    • 2 small units (27 lines of code)
    • 9 very small units (34 lines of code)
0% | 60% | 10% | 12% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cc0% | 64% | 11% | 13% | 10%
hh0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Windows/CustomActions/SwiftInstaller/Sources0% | 64% | 11% | 13% | 10%
Windows/CustomActions/SwiftInstaller/Headers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
std::vector available_toolsets()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
73 21 0
UINT SwiftInstaller_InstallAuxiliaryFiles()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
57 8 1
std::vector available_versions()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
23 4 0
std::filesystem::path install_root()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
16 4 0
std::wstring get_property()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
11 1 2
std::string to_string()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/logging.cc
9 5 1
std::string contents()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
8 2 1
void trim()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
5 1 1
explicit com_initializer()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
4 1 0
explicit com_initializer()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
4 1 1
std::string str()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/logging.hh
1 1 0
severity severity()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/logging.hh
1 1 0
explicit hkey()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
1 1 1
bool succeeded()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
1 1 0