facebookexperimental / resctl-demo
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 662 units with 14,781 lines of code in units (47.5% of code).
    • 1 very complex units (358 lines of code)
    • 2 complex units (364 lines of code)
    • 32 medium complex units (2,840 lines of code)
    • 75 simple units (3,321 lines of code)
    • 552 very simple units (7,898 lines of code)
2% | 2% | 19% | 22% | 53%
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
rs2% | 2% | 19% | 21% | 53%
py0% | 0% | 12% | 31% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
rd-agent/src8% | 0% | 18% | 26% | 45%
resctl-demo/src0% | 7% | 28% | 24% | 38%
resctl-bench-intf/src0% | 38% | 0% | 0% | 61%
resctl-bench/src0% | 0% | 19% | 24% | 55%
rd-hashd/src0% | 0% | 23% | 17% | 59%
rd-util/src0% | 0% | 3% | 15% | 81%
rd-agent-intf/src0% | 0% | 0% | 7% | 92%
rd-hashd-intf/src0% | 0% | 0% | 0% | 100%
rd-util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
358 51 1
201 47 1
163 29 2
72 24 1
98 23 3
57 23 3
135 21 2
113 21 0
87 20 1
116 20 3
134 19 2
222 18 5
103 18 3
59 17 3
156 17 1
178 16 0
36 16 1
59 16 1
87 15 1
84 14 3
94 14 4
90 14 3
213 13 2
27 12 2
44 12 2
35 12 1
39 12 0
63 12 4
68 12 1
54 11 1
73 11 1
29 11 2
90 11 3
51 11 2
74 11 0
49 10 1
91 10 7
85 10 6
35 10 0
83 10 1
32 10 2
32 10 2
49 10 3
40 10 3
41 10 2
43 9 2
25 9 1
46 9 1
21 9 1
70 9 1