google / skia-buildbot
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 11,541 units with 160,574 lines of code in units (61.4% of code).
    • 9 very complex units (2,707 lines of code)
    • 56 complex units (7,831 lines of code)
    • 417 medium complex units (25,853 lines of code)
    • 1,062 simple units (33,961 lines of code)
    • 9,997 very simple units (90,222 lines of code)
1% | 4% | 16% | 21% | 56%
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
go1% | 5% | 17% | 22% | 52%
ts0% | 2% | 7% | 10% | 79%
py0% | 7% | 17% | 20% | 54%
js0% | 0% | 29% | 14% | 55%
cpp0% | 0% | 32% | 0% | 67%
ino0% | 0% | 0% | 18% | 81%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
autoroll9% | 4% | 16% | 12% | 57%
task_scheduler2% | 6% | 27% | 12% | 50%
status3% | 2% | 20% | 15% | 58%
infra10% | 19% | 23% | 7% | 39%
skcq8% | 10% | 4% | 21% | 56%
go0% | 2% | 7% | 25% | 64%
ct0% | 11% | 23% | 21% | 43%
scripts0% | 30% | 38% | 19% | 11%
datahopper0% | 27% | 20% | 30% | 21%
golden0% | 2% | 11% | 33% | 52%
perdiff0% | 45% | 0% | 15% | 39%
bazel0% | 20% | 6% | 24% | 48%
perf0% | 1% | 24% | 16% | 57%
fiddlek0% | 8% | 17% | 22% | 51%
ROOT0% | 30% | 0% | 42% | 26%
kube0% | 29% | 31% | 8% | 30%
k8s-checker0% | 46% | 0% | 27% | 25%
gitsync0% | 17% | 44% | 21% | 16%
sk0% | 8% | 32% | 28% | 30%
task_driver0% | 2% | 21% | 16% | 58%
skottie0% | 0% | 19% | 18% | 62%
am0% | 0% | 18% | 14% | 66%
bugs-central0% | 0% | 23% | 26% | 49%
leasing0% | 0% | 17% | 17% | 65%
android_ingest0% | 0% | 25% | 30% | 44%
machine0% | 0% | 7% | 18% | 73%
docker_pushes_watcher0% | 0% | 64% | 30% | 4%
infra-sk0% | 0% | 9% | 11% | 79%
gold-client0% | 0% | 7% | 23% | 68%
proberk0% | 0% | 36% | 30% | 33%
tree_status0% | 0% | 19% | 15% | 65%
codereview-watcher0% | 0% | 51% | 19% | 28%
named-fiddles0% | 0% | 36% | 53% | 9%
comments0% | 0% | 79% | 0% | 20%
hashtag0% | 0% | 18% | 22% | 58%
new_element0% | 0% | 75% | 0% | 24%
dot0% | 0% | 34% | 46% | 19%
ds0% | 0% | 66% | 0% | 33%
codesize0% | 0% | 16% | 31% | 51%
switchboard0% | 0% | 30% | 37% | 31%
skfe0% | 0% | 29% | 17% | 52%
debugger-app0% | 0% | 4% | 14% | 81%
skolo0% | 0% | 1% | 44% | 53%
shaders0% | 0% | 1% | 2% | 95%
docsyserver0% | 0% | 0% | 38% | 61%
scrap0% | 0% | 0% | 19% | 80%
trybot_updater0% | 0% | 0% | 63% | 36%
sa-keys-checker0% | 0% | 0% | 69% | 30%
promk0% | 0% | 0% | 58% | 41%
jsfiddle0% | 0% | 0% | 20% | 79%
android_stats0% | 0% | 0% | 67% | 32%
cq_watcher0% | 0% | 0% | 36% | 64%
contestk0% | 0% | 0% | 40% | 59%
blamer0% | 0% | 0% | 74% | 25%
particles0% | 0% | 0% | 8% | 91%
get_service_account0% | 0% | 0% | 100% | 0%
test-service0% | 0% | 0% | 0% | 100%
jsdoc0% | 0% | 0% | 0% | 100%
api0% | 0% | 0% | 0% | 100%
periodic-trigger0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func file_config_proto_init()
in autoroll/go/config/config.pb.go
638 147 0
func()
in autoroll/go/state_machine/state_machine.go
275 99 1
func file_rpc_proto_init()
in task_scheduler/go/rpc/rpc.pb.go
386 93 0
func file_rpc_proto_init()
in autoroll/go/rpc/rpc.pb.go
302 72 0
func main()
in autoroll/go/autoroll-be/main.go
263 68 0
func main()
in autoroll/go/autoroll-pusher/main.go
208 58 0
func file_status_proto_init()
in status/go/rpc/status.pb.go
241 57 0
func()
in skcq/go/verifiers/tryjobs_verifier.go
190 55 1
func main()
in infra/bots/task_drivers/roll_cipd_packages/roll_cipd_packages.go
204 52 0
func deepValueEqual()
in go/deepequal/deep_equals.go
132 50 4
func runChromiumAnalysis()
in ct/go/worker_scripts/run_chromium_analysis/main.go
200 47 0
func Yee_Compare()
in perdiff/go/perdiff/yee_compare.go
179 45 2
func main()
in task_scheduler/go/scheduling/perftest/perftest.go
340 43 0
func runChromiumPerf()
in ct/go/worker_scripts/run_chromium_perf/main.go
171 42 0
func main()
in autoroll/go/autoroll-fe/main.go
145 41 0
func()
in bazel/gazelle/frontend/language/language.go
133 41 1
func main()
in run_unittests.go
173 41 0
func()
in autoroll/go/config/config.go
110 40 1
func runChromiumAnalysisOnWorkers()
in ct/go/master_scripts/run_chromium_analysis_on_workers/main.go
174 39 0
func runChromiumPerfOnWorkers()
in ct/go/master_scripts/run_chromium_perf_on_workers/main.go
235 39 0