Linux / Samples
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 806 units with 18,987 lines of code in units (70.7% of code).
    • 1 very complex units (186 lines of code)
    • 17 complex units (2,160 lines of code)
    • 62 medium complex units (4,024 lines of code)
    • 137 simple units (5,282 lines of code)
    • 589 very simple units (7,335 lines of code)
<1% | 11% | 21% | 27% | 38%
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
c<1% | 11% | 21% | 28% | 38%
h0% | 0% | 32% | 14% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
bpf1% | 13% | 21% | 27% | 35%
vfio-mdev0% | 13% | 26% | 33% | 26%
seccomp0% | 22% | 10% | 12% | 55%
vfs0% | 37% | 0% | 25% | 37%
nitro_enclaves0% | 0% | 72% | 18% | 8%
uhid0% | 0% | 58% | 16% | 25%
connector0% | 0% | 72% | 0% | 27%
hidraw0% | 0% | 100% | 0% | 0%
auxdisplay0% | 0% | 32% | 0% | 67%
kfifo0% | 0% | 0% | 48% | 51%
mei0% | 0% | 0% | 61% | 38%
v4l0% | 0% | 0% | 31% | 68%
landlock0% | 0% | 0% | 79% | 20%
qmi0% | 0% | 0% | 48% | 51%
acrn0% | 0% | 0% | 90% | 9%
fanotify0% | 0% | 0% | 81% | 18%
binderfs0% | 0% | 0% | 100% | 0%
pidfd0% | 0% | 0% | 41% | 58%
livepatch0% | 0% | 0% | 0% | 100%
ftrace0% | 0% | 0% | 0% | 100%
kobject0% | 0% | 0% | 0% | 100%
kprobes0% | 0% | 0% | 0% | 100%
configfs0% | 0% | 0% | 0% | 100%
trace_events0% | 0% | 0% | 0% | 100%
kmemleak0% | 0% | 0% | 0% | 100%
rpmsg0% | 0% | 0% | 0% | 100%
hw_breakpoint0% | 0% | 0% | 0% | 100%
trace_printk0% | 0% | 0% | 0% | 100%
kdb0% | 0% | 0% | 0% | 100%
watchdog0% | 0% | 0% | 0% | 100%
coresight0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
186 55 2
216 40 2
102 38 1
136 37 2
219 35 2
118 31 1
112 30 2
110 30 5
123 28 5
99 28 5
153 28 2
81 28 1
91 28 1
87 27 3
126 27 2
136 27 2
176 27 2
75 26 5
81 24 3
82 23 1
84 23 6
88 23 3
92 23 2
73 22 1
92 21 2
114 21 2
97 20 2
116 19 2
66 19 1
61 18 2
72 17 2
63 17 2
69 17 1
71 16 2
46 16 1
75 16 2
84 16 5
43 15 4
94 15 2
81 15 2
57 15 9
71 15 2
84 14 3
79 14 2
64 14 2
49 14 2
66 14 2
60 14 2
71 14 2
79 14 2