apple / swift-llbuild
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 597 files with 136,134 lines of code.
    • 24 very long files (49,489 lines of code)
    • 43 long files (30,131 lines of code)
    • 95 medium size files (28,442 lines of codeclsfd_ftr_w_mp_ins)
    • 99 small files (14,251 lines of code)
    • 336 very small files (13,821 lines of code)
36% | 22% | 20% | 10% | 10%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cpp51% | 18% | 16% | 8% | 4%
h29% | 23% | 22% | 11% | 13%
cc60% | 29% | 8% | 0% | 1%
inc24% | 28% | 36% | 5% | 5%
swift0% | 19% | 38% | 25% | 16%
py0% | 42% | 0% | 34% | 23%
mm0% | 0% | 80% | 0% | 19%
c0% | 0% | 0% | 100% | 0%
html0% | 0% | 0% | 0% | 100%
cmake0% | 0% | 0% | 0% | 100%
TXT0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
el0% | 0% | 0% | 0% | 100%
css0% | 0% | 0% | 0% | 100%
in0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
lib36% | 21% | 22% | 9% | 9%
utils65% | 23% | 5% | 2% | 2%
include4% | 25% | 33% | 16% | 19%
products17% | 13% | 30% | 18% | 19%
unittests0% | 27% | 26% | 31% | 14%
perftests0% | 0% | 80% | 0% | 19%
experimental0% | 0% | 0% | 68% | 31%
ROOT0% | 0% | 0% | 100% | 0%
bindings0% | 0% | 0% | 100% | 0%
cmake0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
gtest-param-util-generated.h
in utils/unittest/googletest/include/gtest/internal
4562 105
gtest-param-util-generated.h
in utils/unittest/googletest/src/include/gtest/internal
4562 105
ItaniumDemangle.cpp
in lib/llvm/Demangle
4156 162
gtest.cc
in utils/unittest/googletest/src
3440 257
APFloat.cpp
in lib/llvm/Support
3089 127
gtest-type-util.h
in utils/unittest/googletest/include/gtest/internal
3082 1
gtest-type-util.h
in utils/unittest/googletest/src/include/gtest/internal
3082 1
BuildSystem.cpp
in lib/BuildSystem
2754 237
YAMLParser.cpp
in lib/llvm/Support
1880 87
APInt.cpp
in lib/llvm/Support
1838 117
NinjaBuildCommand.cpp
in lib/Commands
1676 76
CommandLine.cpp
in lib/llvm/Support
1600 106
MicrosoftDemangle.cpp
in lib/llvm/Demangle
1532 39
Triple.cpp
in lib/llvm/Support
1363 52
gtest-port.h
in utils/unittest/googletest/include/gtest/internal
1250 80
gtest-port.h
in utils/unittest/googletest/src/include/gtest/internal
1250 80
Host.cpp
in lib/llvm/Support
1100 26
BuildEngine.cpp
in lib/Core
1078 59
CommandLine.h
in include/llvm/Support
1060 178
CommandLine.h
in lib/llvm/Support/include/llvm/Support
1060 178
BuildSystem-C-API.cpp
in products/libllbuild
1029 67
gtest-param-test.h
in utils/unittest/googletest/include/gtest
1016 19
gtest-param-test.h
in utils/unittest/googletest/src/include/gtest
1016 19
Path.inc
in lib/llvm/Support/Windows
1014 70
Path.cpp
in lib/llvm/Support
934 76
DenseMap.h
in include/llvm/ADT
911 76
DenseMap.h
in lib/llvm/Support/include/llvm/ADT
911 76
APInt.h
in include/llvm/ADT
906 116
APInt.h
in lib/llvm/Support/include/llvm/ADT
906 116
gtest.h
in utils/unittest/googletest/include/gtest
853 61
gtest.h
in utils/unittest/googletest/src/include/gtest
853 61
gtest-port.cc
in utils/unittest/googletest/src
841 64
gtest-death-test.cc
in utils/unittest/googletest/src
836 39
STLExtras.h
in include/llvm/ADT
831 86
STLExtras.h
in lib/llvm/Support/include/llvm/ADT
831 86
Subprocess.cpp
in lib/Basic
817 19
BuildSystemBindings.swift
in products/llbuildSwift
799 65
BuildEngineTest.cpp
in unittests/Core
782 32
gtest-tuple.h
in utils/unittest/googletest/include/gtest/internal
752 45
gtest-tuple.h
in utils/unittest/googletest/src/include/gtest/internal
752 45
APFloat.h
in include/llvm/ADT
743 84
APFloat.h
in lib/llvm/Support/include/llvm/ADT
743 84
TargetParser.cpp
in lib/llvm/Support
735 68
SQLiteBuildDB.cpp
in lib/Core
709 23
Path.inc
in lib/llvm/Support/Unix
679 49
BuildFile.cpp
in lib/BuildSystem
678 18
Error.h
in include/llvm/Support
666 63
Error.h
in lib/llvm/Support/include/llvm/Support
666 63
NinjaCommand.cpp
in lib/Commands
660 41
BuildSystemFrontend.cpp
in lib/BuildSystem
631 36
Files With Most Units (Top 20)
File# lines# units
gtest.cc
in utils/unittest/googletest/src
3440 257
BuildSystem.cpp
in lib/BuildSystem
2754 237
CommandLine.h
in include/llvm/Support
1060 178
CommandLine.h
in lib/llvm/Support/include/llvm/Support
1060 178
ItaniumDemangle.cpp
in lib/llvm/Demangle
4156 162
APFloat.cpp
in lib/llvm/Support
3089 127
APInt.cpp
in lib/llvm/Support
1838 117
APInt.h
in include/llvm/ADT
906 116
APInt.h
in lib/llvm/Support/include/llvm/ADT
906 116
CommandLine.cpp
in lib/llvm/Support
1600 106
gtest-param-util-generated.h
in utils/unittest/googletest/include/gtest/internal
4562 105
gtest-param-util-generated.h
in utils/unittest/googletest/src/include/gtest/internal
4562 105
YAMLParser.cpp
in lib/llvm/Support
1880 87
STLExtras.h
in include/llvm/ADT
831 86
STLExtras.h
in lib/llvm/Support/include/llvm/ADT
831 86
APFloat.h
in include/llvm/ADT
743 84
APFloat.h
in lib/llvm/Support/include/llvm/ADT
743 84
gtest-port.h
in utils/unittest/googletest/include/gtest/internal
1250 80
gtest-port.h
in utils/unittest/googletest/src/include/gtest/internal
1250 80
DenseMap.h
in include/llvm/ADT
911 76
Files With Long Lines (Top 20)

There are 48 files with lines longer than 120 characters. In total, there are 211 long lines.

File# lines# units# long lines
BuildSystemBindings.swift
in products/llbuildSwift
799 65 35
BuildValue-C-API.cpp
in products/libllbuild
216 14 15
BuildSystem-C-API.cpp
in products/libllbuild
1029 67 14
buildvalue.h
in products/libllbuild/include/llbuild
72 1 14
BuildValueTests.swift
in unittests/Swift
257 21 14
BuildDB-C-API.cpp
in products/libllbuild
281 23 7
BuildDBBindings.swift
in products/llbuildSwift
227 - 7
BuildDBBindingsTests.swift
in unittests/Swift
165 11 7
Tracing.h
in include/llbuild/Basic
145 6 6
Tracing.h
in lib/Basic/include/llbuild/Basic
145 6 6
BuildKey-C-API.cpp
in products/libllbuild
197 23 6
buildkey.h
in products/libllbuild/include/llbuild
53 - 6
BuildSystemEngineTests.swift
in unittests/Swift
295 49 6
BuildValue.swift
in products/llbuildSwift
363 1 5
Subprocess.cpp
in lib/Basic
817 19 4
BuildSystem.cpp
in lib/BuildSystem
2754 237 4
NinjaBuildCommand.cpp
in lib/Commands
1676 76 4
SQLiteBuildDB.cpp
in lib/Core
709 23 4
db.h
in products/libllbuild/include/llbuild
43 - 4
CriticalPathTests.swift
in unittests/Analysis
83 7 4