bazelbuild / rules_apple
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 378 units with 4,701 lines of code in units (15.3% of code).
    • 1 very long units (114 lines of code)
    • 5 long units (315 lines of code)
    • 42 medium size units (1,263 lines of code)
    • 139 small units (2,025 lines of code)
    • 191 very small units (984 lines of code)
2% | 6% | 26% | 43% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py2% | 6% | 26% | 43% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/plisttool4% | 4% | 20% | 51% | 18%
tools/dossier_codesigningtool0% | 15% | 35% | 27% | 21%
tools/imported_dynamic_framework_processor0% | 59% | 0% | 31% | 8%
apple/internal0% | 21% | 31% | 15% | 32%
tools/codesigningtool0% | 0% | 61% | 16% | 21%
tools/xctoolrunner0% | 0% | 49% | 37% | 13%
tools/wrapper_common0% | 0% | 73% | 26% | 0%
tools/versiontool0% | 0% | 25% | 52% | 21%
tools/clangrttool0% | 0% | 90% | 0% | 10%
tools/swift_stdlib_tool0% | 0% | 50% | 49% | 0%
tools/provisioning_profile_tool0% | 0% | 36% | 36% | 27%
tools/bundletool0% | 0% | 0% | 64% | 35%
tools/bitcode_strip0% | 0% | 0% | 100% | 0%
tools/alticonstool0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def test_entitlement_task_update_plist()
in tools/plisttool/plisttool_unittest.py
114 2 1
def generate_arg_parser()
in tools/dossier_codesigningtool/dossier_codesigningtool.py
78 1 0
def main()
in tools/imported_dynamic_framework_processor/imported_dynamic_framework_processor.py
67 19 0
def _validate_entitlements_against_profile()
in tools/plisttool/plisttool.py
57 1 2
def run()
in tools/plisttool/plisttool.py
57 13 1
def discover_best_compatible_simulator()
in apple/internal/templates/ios_sim.template.py
56 24 4
def execute_and_filter_output()
in tools/wrapper_common/execute.py
50 8 8
def _create_dossier()
in tools/dossier_codesigningtool/dossier_codesigningtool.py
44 15 1
def test_recursive_substitutions()
in tools/plisttool/plisttool_unittest.py
43 1 1
def test_nonexistant_variable_substitution()
in tools/plisttool/plisttool_unittest.py
42 1 1
def main()
in tools/codesigningtool/codesigningtool.py
40 12 1
def intentbuilderc()
in tools/xctoolrunner/xctoolrunner.py
39 11 2
def _validate_children()
in tools/plisttool/plisttool.py
38 18 4
def test_variable_substitution_in_key()
in tools/plisttool/plisttool_unittest.py
38 1 1
def actool_filtering()
in tools/xctoolrunner/xctoolrunner.py
38 12 3
def _find_smartcard_identities()
in tools/codesigningtool/codesigningtool.py
38 21 1
def validate_no_variable_references()
in tools/plisttool/plisttool.py
37 6 5
def generate_arg_parser()
in tools/codesigningtool/codesigningtool.py
36 1 0
def test_more_complicated_merge()
in tools/plisttool/plisttool_unittest.py
35 1 1
def _sign_bundle_with_manifest()
in tools/dossier_codesigningtool/dossier_codesigningtool.py
35 4 6