bazelbuild / remote-apis-sdks
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 623 units with 8,467 lines of code in units (79.4% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (343 lines of code)
    • 33 medium complex units (2,028 lines of code)
    • 67 simple units (2,263 lines of code)
    • 520 very simple units (3,833 lines of code)
0% | 4% | 23% | 26% | 45%
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% | 4% | 23% | 26% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
go/pkg/fakes0% | 18% | 20% | 21% | 39%
go/api/command0% | 22% | 0% | 0% | 77%
go/pkg/client0% | 0% | 37% | 25% | 36%
go/pkg/tool0% | 0% | 49% | 29% | 20%
go/pkg/cas0% | 0% | 27% | 38% | 34%
go/pkg/rexec0% | 0% | 20% | 43% | 35%
go/cmd/remotetool0% | 0% | 84% | 0% | 15%
go/pkg/balancer0% | 0% | 9% | 18% | 71%
go/pkg/chunker0% | 0% | 35% | 28% | 36%
go/pkg/reader0% | 0% | 19% | 29% | 50%
go/pkg/command0% | 0% | 0% | 26% | 73%
go/pkg/portpicker0% | 0% | 0% | 69% | 30%
go/pkg/actas0% | 0% | 0% | 65% | 34%
go/pkg/filemetadata0% | 0% | 0% | 35% | 64%
go/cmd/rexec0% | 0% | 0% | 69% | 30%
go/pkg/retry0% | 0% | 0% | 38% | 61%
go/pkg/digest0% | 0% | 0% | 17% | 82%
go/pkg/testutil0% | 0% | 0% | 100% | 0%
go/pkg/moreflag0% | 0% | 0% | 30% | 69%
go/pkg/flags0% | 0% | 0% | 0% | 100%
go/pkg/uploadinfo0% | 0% | 0% | 0% | 100%
go/pkg/outerr0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func file_go_api_command_command_proto_init()
in go/api/command/command.pb.go
158 36 0
func()
in go/pkg/fakes/cas.go
87 30 1
func()
in go/pkg/fakes/cas.go
98 29 1
func loadFiles()
in go/pkg/client/tree.go
73 24 8
func main()
in go/cmd/remotetool/main.go
66 22 0
func()
in go/pkg/client/cas.go
116 22 1
func()
in go/pkg/fakes/cas.go
57 21 1
func()
in go/pkg/rexec/rexec.go
77 21 1
func()
in go/pkg/client/cas.go
91 20 1
func()
in go/pkg/client/cas.go
93 20 1
func()
in go/pkg/client/cas.go
57 18 1
func()
in go/pkg/fakes/server.go
90 18 1
func()
in go/pkg/fakes/cas.go
51 17 1
func()
in go/pkg/client/cas.go
55 16 1
func()
in go/pkg/client/cas.go
62 16 1
func()
in go/pkg/client/cas.go
69 16 1
func()
in go/pkg/client/tree.go
65 16 1
func()
in go/pkg/cas/upload.go
68 16 1
func()
in go/pkg/reader/reader.go
31 14 1
func()
in go/pkg/balancer/gcp_picker.go
53 14 1