flutter / buildroot
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 327 units with 4,090 lines of code in units (38.7% of code).
    • 2 very long units (254 lines of code)
    • 6 long units (376 lines of code)
    • 50 medium size units (1,495 lines of code)
    • 59 small units (905 lines of code)
    • 210 very small units (1,060 lines of code)
6% | 9% | 36% | 22% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py6% | 9% | 36% | 22% | 25%
cc0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
build/android24% | 0% | 31% | 19% | 24%
build/config39% | 0% | 27% | 14% | 18%
build0% | 9% | 46% | 21% | 22%
build/mac0% | 37% | 23% | 12% | 25%
tools/dart0% | 19% | 20% | 22% | 37%
build/linux0% | 0% | 67% | 16% | 16%
build/fuchsia0% | 0% | 79% | 0% | 20%
build/toolchain0% | 0% | 26% | 41% | 31%
build/win0% | 0% | 27% | 37% | 35%
tools0% | 0% | 0% | 95% | 5%
tools/buildtools0% | 0% | 0% | 70% | 29%
build/pyutil0% | 0% | 0% | 0% | 100%
build/sanitizers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in build/android/gyp/javac.py
151 30 1
def main()
in build/config/linux/pkg-config.py
103 19 0
def ToGNString()
in build/gn_helpers.py
75 47 2
def compute_dynamic_package_lists()
in build/install-build-deps.py
69 16 0
def main()
in build/mac/find_sdk.py
66 17 0
def Main()
in tools/dart/create_updated_flutter_deps.py
60 23 1
def main()
in tools/dart/dart_roll_helper.py
54 10 0
def Main()
in build/mac/tweak_info_plist.py
52 4 1
def DoMain()
in build/linux/unbundle/remove_bundled_libraries.py
48 16 1
47 7 1
def _ParseCommandLine()
in build/get_syzygy_binaries.py
45 10 0
def _CopyUCRTRuntime()
in build/vs_toolchain.py
44 6 5
def _InstallBinaries()
in build/get_syzygy_binaries.py
43 5 2
43 14 0
def main()
in build/fuchsia/fidl_gen_cpp.py
43 8 0
def InstallSysroot()
in build/linux/sysroot_scripts/install-sysroot.py
40 7 2
def main()
in build/linux/install-chromeos-fonts.py
40 10 1
def main()
in build/android/gyp/create_flutter_jar.py
39 9 1
def main()
in build/install-build-deps.py
38 10 1
def Update()
in build/vs_toolchain.py
38 10 2