bazelbuild / tulsi
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 676 units with 10,992 lines of code in units (45.2% of code).
    • 12 very long units (1,498 lines of code)
    • 26 long units (1,905 lines of code)
    • 102 medium size units (3,163 lines of code)
    • 168 small units (2,502 lines of code)
    • 368 very small units (1,924 lines of code)
13% | 17% | 28% | 22% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift14% | 17% | 27% | 22% | 17%
py7% | 14% | 35% | 24% | 18%
c0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/TulsiGeneratorTests23% | 27% | 28% | 15% | 5%
src/TulsiGenerator8% | 7% | 26% | 30% | 27%
src/TulsiGeneratorIntegrationTests14% | 16% | 33% | 29% | 6%
src/Tulsi0% | 19% | 28% | 20% | 30%
src/TulsiEndToEndTests0% | 0% | 32% | 23% | 44%
src/tools0% | 0% | 67% | 21% | 11%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func testGenerateWatchOSTarget()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
166 2 0
func testGenerateMacOSTarget()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
164 2 0
func complexSingleTest_DefaultConfig()
in src/TulsiGeneratorIntegrationTests/AspectTests.swift
155 1 0
func generateIndexerTargetGraphForRuleEntry()
in src/TulsiGenerator/PBXTargetGenerator.swift
121 19 1
func checkGenerateTargetsForLinkedRuleEntriesWithSources()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
117 2 3
func testGenerateTargetsForLinkedRuleEntriesWithNoSourcesMacOSUnitTests()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
115 2 0
func testGenerateTargetsForLinkedRuleEntriesWithSourcesWithSkylarkUITest()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
115 2 0
func testGenerateTargetsForLinkedRuleEntriesWithNoSourcesMacOSUITests()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
113 2 0
func parseTulsiTargetFileImpl()
in src/TulsiGenerator/BazelAspectInfoExtractor.swift
110 7 1
func checkGenerateTargetsForLinkedRuleEntriesWithNoSources()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
110 2 3
func testGenerateTargetsForLinkedRuleEntriesWithNoSourcesAndSkylarkUITest()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
107 2 0
def Run()
in src/TulsiGenerator/Scripts/bazel_build.py
105 30 2
func testGenerateTargetsForRuleEntriesWithAppClips()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
95 2 0
func testGenerateTargetsForRuleEntriesWithTheSameBundleName()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
95 2 0
func testGenerateTargetsForRuleEntries()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
94 2 0
def _RunBazelAndPatchOutput()
in src/TulsiGenerator/Scripts/bazel_build.py
93 17 2
func testGenerateTargetsForRuleEntriesWithTheSameName()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
93 2 0
func testGenerateTargetsForRuleEntriesWithSamePotentialName()
in src/TulsiGeneratorTests/PBXTargetGeneratorTests.swift
93 2 0
func generate()
in src/Tulsi/HeadlessXcodeProjectGenerator.swift
85 15 0
init()
in src/Tulsi/TulsiCommandlineParser.swift
83 25 0