google / testimony
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 71 units with 1,355 lines of code in units (81.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (552 lines of code)
    • 10 simple units (325 lines of code)
    • 52 very simple units (478 lines of code)
0% | 0% | 40% | 23% | 35%
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% | 39% | 24% | 35%
c0% | 0% | 42% | 22% | 35%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
go/testimonyd/internal/socket0% | 0% | 55% | 10% | 34%
c0% | 0% | 31% | 27% | 40%
go/testimony0% | 0% | 48% | 28% | 23%
go/testclient0% | 0% | 0% | 100% | 0%
go/testimonyd0% | 0% | 0% | 100% | 0%
go/protocol0% | 0% | 0% | 26% | 73%
go/protocol/to_c0% | 0% | 0% | 0% | 100%
go/testimonyd/internal/vlog0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int testimony_connect()
in c/testimony.c
87 20 2
func Connect()
in go/testimony/testimony.go
62 19 1
58 14 3
func()
in go/testimonyd/internal/socket/daemon.go
62 14 1
func()
in go/testimonyd/internal/socket/socket.go
64 14 1
func RunTestimony()
in go/testimonyd/internal/socket/daemon.go
51 13 1
int AFPacket()
in go/testimonyd/internal/socket/socket.c
94 13 12
func()
in go/testimony/testimony.go
35 11 1
func()
in go/testimonyd/internal/socket/socket.go
39 11 1
int main()
in c/testimony_client.c
68 10 2
func main()
in go/testclient/testclient.go
45 10 0
static int recv_t()
in c/testimony.c
27 7 3
func()
in go/testimony/testimony.go
24 7 1
func()
in go/testimony/testimony.go
32 7 1
func main()
in go/testimonyd/daemon.go
26 7 0
func()
in go/testimonyd/internal/socket/socket.go
26 7 1
func compileFilter()
in go/testimonyd/internal/socket/socket.go
32 7 2
int testimony_init()
in c/testimony.c
34 6 1
func TypeOf()
in go/protocol/protocol.go
11 6 1
31 5 1