firecracker-microvm / firecracker-containerd
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 836 units with 7,994 lines of code in units (80.0% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (555 lines of code)
    • 16 medium complex units (1,299 lines of code)
    • 39 simple units (1,332 lines of code)
    • 777 very simple units (4,808 lines of code)
0% | 6% | 16% | 16% | 60%
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% | 6% | 16% | 16% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
proto/service0% | 29% | 24% | 8% | 37%
internal/debug0% | 45% | 0% | 29% | 25%
runtime0% | 0% | 17% | 35% | 46%
agent0% | 0% | 36% | 9% | 53%
firecracker-control0% | 0% | 33% | 0% | 66%
internal/cmd0% | 0% | 75% | 0% | 24%
internal/vm0% | 0% | 0% | 21% | 78%
internal0% | 0% | 0% | 28% | 71%
config0% | 0% | 0% | 100% | 0%
eventbridge0% | 0% | 0% | 29% | 70%
proto0% | 0% | 0% | 0% | 100%
internal/bundle0% | 0% | 0% | 0% | 100%
runtime/cpuset0% | 0% | 0% | 0% | 100%
runtime/firecrackeroci0% | 0% | 0% | 0% | 100%
firecracker-control/client0% | 0% | 0% | 0% | 100%
firecracker-control/cmd0% | 0% | 0% | 0% | 100%
internal/shim0% | 0% | 0% | 0% | 100%
client0% | 0% | 0% | 0% | 100%
internal/event0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in proto/service/drivemount/ttrpc/drivemount.pb.go
181 49 1
func()
in proto/service/ioproxy/ttrpc/ioproxy.pb.go
174 49 1
func()
in internal/debug/debug.go
83 36 1
func()
in proto/service/ioproxy/ttrpc/ioproxy.pb.go
117 31 1
func skipDrivemount()
in proto/service/drivemount/ttrpc/drivemount.pb.go
78 24 1
func skipIoproxy()
in proto/service/ioproxy/ttrpc/ioproxy.pb.go
78 24 1
func()
in proto/service/drivemount/ttrpc/drivemount.pb.go
85 22 1
func()
in runtime/service.go
93 22 1
func()
in proto/service/ioproxy/ttrpc/ioproxy.pb.go
73 19 1
func main()
in agent/main.go
88 18 0
func()
in runtime/service.go
84 18 1
func()
in firecracker-control/local.go
88 18 1
func add()
in internal/cmd/test-bridged-tap/main.go
101 17 1
func()
in agent/service.go
92 16 1
func RegisterFirecrackerService()
in proto/service/fccontrol/ttrpc/fccontrol.pb.go
88 13 2
func()
in runtime/runc_jailer.go
66 13 1
func()
in runtime/service.go
56 12 1
func()
in runtime/service.go
79 12 1
func()
in firecracker-control/local.go
73 12 1
func()
in agent/service.go
77 11 1