bazelbuild / continuous-integration
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 751 units with 10,028 lines of code in units (51.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 21 medium complex units (1,072 lines of code)
    • 75 simple units (2,140 lines of code)
    • 655 very simple units (6,816 lines of code)
0% | 0% | 10% | 21% | 67%
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% | 15% | 28% | 55%
go0% | 0% | 12% | 24% | 62%
rs0% | 0% | 23% | 0% | 76%
java0% | 0% | 2% | 10% | 86%
tsx0% | 0% | 0% | 11% | 88%
ts0% | 0% | 0% | 25% | 75%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
buildkite0% | 0% | 17% | 29% | 53%
metrics0% | 0% | 13% | 24% | 62%
agent0% | 0% | 23% | 0% | 76%
dashboard0% | 0% | 1% | 11% | 86%
pipestats0% | 0% | 23% | 44% | 31%
buildifier0% | 0% | 0% | 35% | 64%
pipegen0% | 0% | 0% | 16% | 83%
rbe-configs0% | 0% | 0% | 18% | 81%
docgen0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def calculate_targets()
in buildkite/bazelci.py
31 20 5
func collectPipelineResults()
in metrics/metrics/platform_significance.go
57 18 1
def _analyze_for_downstream_pipeline_result()
in buildkite/bazel_auto_sheriff.py
43 16 1
def main()
in buildkite/culprit_finder.py
81 15 1
def worker()
in buildkite/create_instances.py
55 15 0
def get_failing_jobs()
in buildkite/incompatible_flag_verbose_failures.py
41 15 1
def main()
in buildkite/bazelci.py
134 14 1
func computeDayBuildStats()
in pipestats/main.go
42 14 1
fn watch_bep_json_file()
in agent/src/artifact/upload.rs
67 13 6
func main()
in metrics/main.go
92 13 0
def main()
in buildkite/create_instance_template.py
39 13 1
def main()
in buildkite/update_instances.py
39 13 1
def _analyze()
in buildkite/bazel_auto_sheriff.py
39 13 1
def upload_bazel_binaries()
in buildkite/bazelci.py
44 13 0
def main()
in buildkite/create_instances.py
39 13 1
private static QuerySpec buildQuerySpec()
in dashboard/server/src/main/java/build/bazel/dashboard/github/issuelist/GithubIssueListRepoPg.java
59 12 1
def migrate()
in buildkite/terraform/migrate.py
44 12 3
func()
in metrics/metrics/builds_per_change.go
36 11 1
func analyzeJobsPerformance()
in metrics/metrics/common.go
38 11 1
func()
in metrics/metrics/platform_load.go
33 11 1