Linux / Drivers / Comedi
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 2,186 units with 48,623 lines of code in units (51.1% of code).
    • 1 very complex units (176 lines of code)
    • 19 complex units (2,583 lines of code)
    • 169 medium complex units (10,656 lines of code)
    • 333 simple units (12,624 lines of code)
    • 1,664 very simple units (22,584 lines of code)
<1% | 5% | 21% | 25% | 46%
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% | 5% | 22% | 25% | 46%
py0% | 0% | 8% | 41% | 49%
h0% | 0% | 0% | 21% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
drivers<1% | 4% | 22% | 26% | 46%
ROOT0% | 17% | 16% | 23% | 43%
kcomedilib0% | 0% | 0% | 32% | 67%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
176 65 3
286 43 3
157 43 2
155 41 2
65 40 2
223 38 2
128 37 2
169 37 4
116 36 3
148 36 3
106 33 4
122 32 3
140 32 2
105 32 4
103 30 2
98 30 4
156 28 2
111 27 3
115 27 4
80 26 2
81 25 3
91 24 2
71 24 3
127 23 3
139 23 2
89 23 3
91 22 3
71 22 4
153 22 1
121 22 2
46 21 1
130 21 2
79 21 3
109 21 3
76 20 3
102 20 2
88 20 2
68 20 3
107 19 3
100 19 2
93 18 4
35 18 3
75 18 2
106 18 2
63 18 3
58 18 3
44 18 3
105 17 2
72 17 3
61 17 2