apple / swift-source-compat-suite
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 136 units with 1,745 lines of code in units (89.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (107 lines of code)
    • 15 simple units (523 lines of code)
    • 119 very simple units (1,115 lines of code)
0% | 0% | 6% | 29% | 63%
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% | 0% | 6% | 29% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 6% | 30% | 63%
utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in reproduce.py
65 22 0
def __str__()
in project_future.py
42 15 1
def get_prebuild_command()
in project_future.py
40 10 2
def dispatch()
in project_future.py
103 10 16
def is_xfailed()
in project_future.py
28 10 6
def get_build_command()
in project_future.py
37 9 2
def build_swift_package()
in project_future.py
32 9 10
def have_same_trees()
in project_future.py
23 9 3
21 7 7
def checkout()
in project_future.py
26 7 6
def main()
in runner.py
49 7 0
def git_update()
in common.py
33 6 6
def test_swift_package()
in project_future.py
21 6 8
def dispatch()
in project_future.py
27 6 4
def failed()
in project_future.py
34 6 3
def succeeded()
in project_future.py
34 6 2
def build()
in project_future.py
15 6 2
def git_clone()
in common.py
13 5 6
def build()
in project_future.py
16 5 6
def included_element()
in project_future.py
6 5 3