bazelbuild / bazel-bench
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 88 units with 1,145 lines of code in units (78.7% 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)
    • 9 simple units (259 lines of code)
    • 77 very simple units (779 lines of code)
0% | 0% | 9% | 22% | 68%
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% | 9% | 22% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 22% | 45% | 32%
utils0% | 0% | 9% | 15% | 74%
report0% | 0% | 0% | 11% | 88%
testutils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in benchmark.py
76 17 1
def _accumulate_event_duration()
in utils/json_profiles_merger_lib.py
31 11 3
def _parse_unit()
in utils/benchmark_config.py
26 10 2
def create_summary()
in benchmark.py
60 9 2
def _flag_checks()
in benchmark.py
10 8 0
def _prepare_time_series_data()
in report/generate_master_report.py
32 6 1
def _get_proportion_breakdown()
in report/generate_report.py
19 6 1
22 6 4
def _run_benchmark()
in benchmark.py
40 6 14
25 6 7
def command()
in utils/bazel.py
25 6 3
def _generate_report_for_date()
in report/generate_master_report.py
45 5 6
def _prepare_data_for_graph()
in report/generate_report.py
46 5 2
def _generate_report_for_date()
in report/generate_report.py
109 5 7
33 5 1
def from_string()
in utils/benchmark_config.py
14 5 2
def from_flags()
in utils/benchmark_config.py
28 5 9
def aggregate_data()
in utils/json_profiles_merger_lib.py
13 5 2
def main()
in report/generate_report.py
40 4 1
17 4 4