dart-lang / webcore
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 822 units with 7,783 lines of code in units (82.4% of code).
    • 1 very complex units (70 lines of code)
    • 8 complex units (838 lines of code)
    • 29 medium complex units (1,122 lines of code)
    • 93 simple units (1,928 lines of code)
    • 691 very simple units (3,825 lines of code)
<1% | 10% | 14% | 24% | 49%
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
py<1% | 10% | 14% | 24% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
bindings/scripts1% | 13% | 16% | 25% | 42%
blink/tools0% | 0% | 26% | 43% | 30%
idl_parser0% | 0% | 0% | 8% | 91%
modules/bluetooth/testing/clusterfuzz0% | 0% | 0% | 12% | 87%
core/frame0% | 0% | 0% | 80% | 20%
bindings0% | 0% | 0% | 87% | 12%
blink/tools/blinkpy/common0% | 0% | 0% | 51% | 48%
core/inspector0% | 0% | 0% | 72% | 27%
modules/webgl0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def resolution_tests_methods()
in bindings/scripts/v8_interface.py
70 56 1
def cpp_type()
in bindings/scripts/v8_types.py
83 50 6
def interface_context()
in bindings/scripts/v8_interface.py
241 38 2
def overloads_context()
in bindings/scripts/v8_interface.py
77 35 2
def attribute_context()
in bindings/scripts/v8_attributes.py
127 33 3
def method_context()
in bindings/scripts/v8_methods.py
114 30 3
def v8_value_to_cpp_value()
in bindings/scripts/v8_types.py
61 29 5
def ext_attributes_node_to_extended_attributes()
in bindings/scripts/idl_definitions.py
53 28 1
def __init__()
in bindings/scripts/idl_definitions.py
82 26 2
def container_context()
in bindings/scripts/v8_union.py
80 25 2
def methods_context()
in bindings/scripts/v8_interface.py
181 23 1
def compute_interfaces_info_overall()
in bindings/scripts/compute_interfaces_info_overall.py
68 21 1
def distinguishing_argument_index()
in bindings/scripts/v8_interface.py
34 21 1
def create_interface_context()
in bindings/scripts/generate_v8_context_snapshot_external_references.py
65 21 3
def v8_conversion_type()
in bindings/scripts/v8_types.py
25 18 2
def origin_trial_features()
in bindings/scripts/v8_interface.py
25 18 4
def getter_context()
in bindings/scripts/v8_attributes.py
31 17 3
def v8_value_to_local_cpp_value()
in bindings/scripts/v8_types.py
39 17 6
def member_impl_context()
in bindings/scripts/v8_dictionary.py
51 16 4
def collect_info()
in bindings/scripts/compute_interfaces_info_individual.py
78 14 3