flutter / buildroot
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 327 units with 4,090 lines of code in units (38.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (226 lines of code)
    • 12 medium complex units (546 lines of code)
    • 58 simple units (1,351 lines of code)
    • 255 very simple units (1,967 lines of code)
0% | 5% | 13% | 33% | 48%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 5% | 13% | 33% | 48%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
build/android0% | 24% | 0% | 29% | 45%
build0% | 5% | 16% | 37% | 41%
build/config0% | 0% | 39% | 9% | 50%
tools/dart0% | 0% | 13% | 21% | 64%
build/mac0% | 0% | 21% | 21% | 57%
build/linux0% | 0% | 20% | 62% | 16%
build/toolchain0% | 0% | 0% | 61% | 38%
build/fuchsia0% | 0% | 0% | 44% | 55%
tools0% | 0% | 0% | 95% | 5%
build/win0% | 0% | 0% | 17% | 82%
tools/buildtools0% | 0% | 0% | 0% | 100%
build/pyutil0% | 0% | 0% | 0% | 100%
build/sanitizers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def ToGNString()
in build/gn_helpers.py
75 47 2
def main()
in build/android/gyp/javac.py
151 30 1
def Main()
in tools/dart/create_updated_flutter_deps.py
60 23 1
def main()
in build/config/linux/pkg-config.py
103 19 0
def main()
in build/get_syzygy_binaries.py
27 17 0
def Main()
in build/download_nacl_toolchains.py
30 17 1
def main()
in build/mac/find_sdk.py
66 17 0
def DoMain()
in build/linux/unbundle/remove_bundled_libraries.py
48 16 1
def compute_dynamic_package_lists()
in build/install-build-deps.py
69 16 0
43 14 0
def builder()
in build/landmine_utils.py
22 11 0
def GetVisualStudioVersion()
in build/vs_toolchain.py
22 11 0
def GetVersion()
in build/compiler_version.py
35 11 2
def bucket_states_by_commit()
in tools/dart/dart_buildbot_helper.py
21 11 1
def main()
in build/toolchain/win/setup_toolchain.py
36 10 0
def main()
in build/linux/install-chromeos-fonts.py
40 10 1
def _StateIsValid()
in build/get_syzygy_binaries.py
20 10 1
def _ParseCommandLine()
in build/get_syzygy_binaries.py
45 10 0
def main()
in build/install-build-deps.py
38 10 1
def main()
in build/env_dump.py
33 10 0