bazelbuild / bazel-toolchains
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 54 units with 1,165 lines of code in units (63.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (317 lines of code)
    • 12 simple units (357 lines of code)
    • 37 very simple units (491 lines of code)
0% | 0% | 27% | 30% | 42%
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
go0% | 0% | 27% | 30% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/rbeconfigsgen0% | 0% | 35% | 34% | 29%
cmd/rbe_configs_gen0% | 0% | 41% | 35% | 23%
cmd/rbe_configs_upload0% | 0% | 0% | 42% | 57%
pkg/monitoring0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in pkg/rbeconfigsgen/options.go
69 22 1
func genCppConfigs()
in pkg/rbeconfigsgen/rbeconfigsgen.go
83 16 3
func printFlags()
in cmd/rbe_configs_gen/rbe_configs_gen.go
49 15 0
func genJavaConfigs()
in pkg/rbeconfigsgen/rbeconfigsgen.go
61 14 2
func Run()
in pkg/rbeconfigsgen/rbeconfigsgen.go
55 13 1
func copyCppConfigsToTarball()
in pkg/rbeconfigsgen/rbeconfigsgen.go
38 10 2
func assembleConfigTarball()
in pkg/rbeconfigsgen/rbeconfigsgen.go
28 9 2
func copyCppConfigsToOutputDir()
in pkg/rbeconfigsgen/rbeconfigsgen.go
35 9 2
func main()
in cmd/rbe_configs_upload/rbe_configs_upload.go
30 8 0
func copyConfigsToOutputDir()
in pkg/rbeconfigsgen/rbeconfigsgen.go
24 8 2
func newDockerRunner()
in pkg/rbeconfigsgen/rbeconfigsgen.go
34 7 2
func()
in pkg/rbeconfigsgen/rbeconfigsgen.go
27 7 1
func installBazelisk()
in pkg/rbeconfigsgen/rbeconfigsgen.go
27 7 3
func main()
in cmd/rbe_configs_gen/rbe_configs_gen.go
42 6 0
func uploadConfigs()
in cmd/rbe_configs_upload/rbe_configs_upload.go
25 6 2
func appendCppEnv()
in pkg/rbeconfigsgen/rbeconfigsgen.go
20 6 2
func createManifest()
in pkg/rbeconfigsgen/rbeconfigsgen.go
27 6 1
func initMonitoringClient()
in cmd/rbe_configs_gen/rbe_configs_gen.go
16 5 1
func initMonitoringClient()
in cmd/rbe_configs_upload/rbe_configs_upload.go
16 5 1
func()
in pkg/rbeconfigsgen/options.go
18 5 1