facebook / OpenBIC
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 499 units with 10,271 lines of code in units (52.3% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (872 lines of code)
    • 41 medium complex units (2,423 lines of code)
    • 90 simple units (3,052 lines of code)
    • 363 very simple units (3,924 lines of code)
0% | 8% | 23% | 29% | 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
c0% | 8% | 23% | 29% | 37%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
common/ipmi0% | 53% | 8% | 14% | 23%
meta-facebook/yv35-cl0% | 6% | 23% | 30% | 39%
common/util0% | 0% | 39% | 17% | 42%
meta-facebook/yv35-bb0% | 0% | 25% | 40% | 33%
common/sensor0% | 0% | 23% | 38% | 38%
common/mctp0% | 0% | 18% | 52% | 28%
common/pldm0% | 0% | 26% | 44% | 29%
common/host0% | 0% | 70% | 0% | 29%
common/shell0% | 0% | 16% | 39% | 43%
common0% | 0% | 0% | 0% | 100%
common/usb0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
290 44 3
158 38 1
202 35 3
132 30 3
90 28 1
45 24 2
77 22 1
73 21 0
86 21 3
67 20 0
71 20 3
87 17 2
76 17 4
88 17 5
60 17 4
59 16 1
58 16 1
51 16 4
73 15 0
76 15 1
65 15 1
75 15 1
72 15 3
61 15 2
53 14 1
66 14 3
80 14 2
57 13 3
56 12 1
47 12 1
46 12 1
58 12 5
35 12 1
70 12 0
19 11 1
45 11 1
40 11 3
45 11 1
55 11 2
64 11 1
36 11 3
36 11 4
44 11 4
51 11 2
47 11 2
53 11 1
60 10 2
58 10 1
60 10 2
46 10 1