facebook / chisel
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 566 units with 4,483 lines of code in units (86.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (48 lines of code)
    • 12 medium complex units (528 lines of code)
    • 19 simple units (436 lines of code)
    • 534 very simple units (3,471 lines of code)
0% | 1% | 11% | 9% | 77%
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
py0% | 1% | 9% | 9% | 78%
mm0% | 0% | 45% | 8% | 45%
c0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
commands0% | 1% | 9% | 9% | 80%
Chisel/Chisel0% | 0% | 39% | 7% | 53%
ROOT0% | 0% | 15% | 13% | 71%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
48 26 3
65 19 2
51 16 3
31 14 3
42 13 2
35 12 2
75 12 3
40 12 2
44 12 1
35 12 2
31 11 2
27 11 1
52 11 3
29 10 4
19 9 2
13 9 2
19 9 2
16 8 2
23 8 1
33 8 1
25 8 1
19 7 2
23 7 0
13 6 1
18 6 3
26 6 3
37 6 4
12 6 0
34 6 3
34 6 1
30 6 2
13 6 1
14 5 2
21 5 3
14 5 1
13 5 3
13 5 3
20 5 3
12 5 2
19 5 3
20 5 2
24 5 2
13 5 3
14 5 2
32 5 1
25 5 1
37 5 1
14 5 2
13 5 0
16 4 1