firecracker-microvm / firecracker-go-sdk
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 1,048 units with 7,498 lines of code in units (73.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (254 lines of code)
    • 43 simple units (1,152 lines of code)
    • 1,000 very simple units (6,092 lines of code)
0% | 0% | 3% | 15% | 81%
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% | 3% | 15% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 13% | 17% | 68%
client/operations0% | 0% | 0% | 16% | 83%
client/models0% | 0% | 0% | 8% | 91%
cni/vmconf0% | 0% | 0% | 45% | 54%
cni/internal0% | 0% | 0% | 13% | 86%
fctesting0% | 0% | 0% | 0% | 100%
client0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in network.go
38 15 1
func()
in machine.go
37 14 1
64 13 1
func()
in network.go
67 13 1
func NewMachine()
in machine.go
48 11 3
func()
in machine.go
65 9 1
func jail()
in jailer.go
51 9 3
func()
in network.go
52 8 1
func()
in machine.go
32 7 1
func()
in machine.go
24 7 1
func()
in client/operations/patch_balloon_stats_interval_responses.go
25 7 1
func()
in client/operations/load_snapshot_responses.go
25 7 1
func()
in client/operations/put_guest_boot_source_responses.go
25 7 1
func()
in client/operations/patch_balloon_responses.go
25 7 1
func()
in client/operations/patch_vm_responses.go
25 7 1
func()
in client/operations/get_mmds_responses.go
25 7 1
func()
in client/operations/put_machine_configuration_responses.go
25 7 1
func()
in client/operations/put_balloon_responses.go
25 7 1
func()
in client/operations/put_guest_vsock_responses.go
25 7 1
func()
in client/operations/create_snapshot_responses.go
25 7 1