facebook / mcrouter
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 3,237 units with 32,429 lines of code in units (50.3% of code).
    • 0 very complex units (0 lines of code)
    • 6 complex units (814 lines of code)
    • 56 medium complex units (3,674 lines of code)
    • 241 simple units (7,222 lines of code)
    • 2,934 very simple units (20,719 lines of code)
0% | 2% | 11% | 22% | 63%
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
h0% | 2% | 10% | 14% | 72%
cpp0% | 2% | 12% | 31% | 53%
c0% | 0% | 0% | 25% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
mcrouter0% | 7% | 16% | 20% | 55%
mcrouter/tools/mcpiper0% | 12% | 2% | 21% | 62%
mcrouter/lib/network0% | 1% | 6% | 30% | 62%
mcrouter/lib0% | 2% | 9% | 14% | 73%
mcrouter/routes0% | 0% | 21% | 18% | 59%
mcrouter/lib/carbon0% | 0% | 8% | 9% | 82%
mcrouter/lib/config0% | 0% | 16% | 29% | 54%
mcrouter/lib/fbi0% | 0% | 10% | 12% | 76%
mcrouter/lib/mc0% | 0% | 23% | 14% | 62%
mcrouter/lib/debug0% | 0% | 0% | 28% | 71%
mcrouter/lib/routes0% | 0% | 0% | 11% | 88%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
144 40 3
167 39 9
217 39 0
133 35 0
114 26 2
39 26 1
78 25 3
73 23 0
77 22 3
86 22 2
81 22 2
127 21 3
183 20 6
70 20 1
232 19 2
60 19 2
109 19 2
135 17 0
74 17 0
82 17 0
63 16 1
72 16 3
62 16 3
61 15 7
21 15 1
16 14 1
53 14 4
95 14 2
67 14 2
14 13 2
34 13 4
58 13 2
42 13 1
77 13 0
60 13 1
59 13 0
33 12 3
72 12 6
53 12 1
33 12 1
60 12 2
88 12 2
16 12 1
58 12 3
36 12 2
62 12 3
41 12 5
67 12 2
46 11 2
38 11 2