Linux / Drivers / Leds
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,091 units with 20,710 lines of code in units (70.9% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (261 lines of code)
    • 53 medium complex units (3,297 lines of code)
    • 167 simple units (6,264 lines of code)
    • 869 very simple units (10,888 lines of code)
0% | 1% | 15% | 30% | 52%
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
c0% | 1% | 15% | 30% | 52%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 1% | 17% | 31% | 49%
flash0% | 0% | 15% | 25% | 58%
trigger0% | 0% | 6% | 25% | 68%
simple0% | 0% | 65% | 0% | 34%
blink0% | 0% | 0% | 41% | 58%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
163 33 1
98 32 1
95 25 1
148 24 2
55 21 2
71 19 2
40 19 3
100 19 3
71 17 1
101 16 1
72 16 1
88 16 3
74 15 3
58 15 1
54 15 2
62 15 3
65 14 1
74 14 3
57 14 3
61 14 1
68 14 1
49 13 3
65 13 2
106 13 3
40 13 2
60 13 1
71 13 1
79 13 2
59 13 2
63 13 3
52 13 3
49 12 3
42 12 3
65 12 1
43 12 2
40 12 2
57 12 3
35 12 4
68 12 1
49 12 3
46 12 4
53 12 7
42 11 3
46 11 2
42 11 5
59 11 1
53 11 2
50 11 1
51 11 1
79 11 1