facebookincubator / fbender
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 219 units with 1,842 lines of code in units (62.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 10 simple units (276 lines of code)
    • 209 very simple units (1,566 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 0% | 14% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd/core0% | 0% | 0% | 17% | 82%
tester0% | 0% | 0% | 36% | 63%
protocols/udp0% | 0% | 0% | 100% | 0%
cmd/dhcpv40% | 0% | 0% | 25% | 74%
tester/dns0% | 0% | 0% | 53% | 46%
cmd/dns0% | 0% | 0% | 20% | 79%
flags0% | 0% | 0% | 6% | 93%
tester/dhcpv40% | 0% | 0% | 36% | 63%
cmd/dhcpv60% | 0% | 0% | 0% | 100%
cmd/http0% | 0% | 0% | 0% | 100%
recorders0% | 0% | 0% | 0% | 100%
tester/run0% | 0% | 0% | 0% | 100%
utils0% | 0% | 0% | 0% | 100%
cmd0% | 0% | 0% | 0% | 100%
metric0% | 0% | 0% | 0% | 100%
cmd/tftp0% | 0% | 0% | 0% | 100%
tester/dhcpv60% | 0% | 0% | 0% | 100%
cmd/udp0% | 0% | 0% | 0% | 100%
tester/http0% | 0% | 0% | 0% | 100%
tester/tftp0% | 0% | 0% | 0% | 100%
tester/udp0% | 0% | 0% | 0% | 100%
log0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
39 10 3
39 9 3
18 8 1
18 7 1
24 7 1
38 6 1
27 6 1
22 6 1
28 6 2
23 6 1
23 5 0
22 5 3
20 5 2
21 5 1
21 5 1
19 5 1
14 5 1
16 5 2
22 4 1
17 4 3
15 4 3
13 4 1
14 4 1
15 4 3
20 4 2
14 4 1
27 4 2
13 4 1
14 4 1
11 4 2
13 4 3
17 4 4
13 4 3
17 4 4
21 4 1
14 3 0
14 3 2
8 3 1
23 3 1
8 3 3
11 3 1
12 3 3
11 3 3
16 3 2
24 3 1
16 3 2
14 3 2
16 3 2
16 3 1
11 3 3