facebookincubator / xar
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 205 units with 2,827 lines of code in units (64.7% of code).
    • 1 very complex units (215 lines of code)
    • 0 complex units (0 lines of code)
    • 14 medium complex units (758 lines of code)
    • 17 simple units (368 lines of code)
    • 173 very simple units (1,486 lines of code)
7% | 0% | 26% | 13% | 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
cpp22% | 0% | 27% | 14% | 35%
py0% | 0% | 29% | 16% | 53%
rs0% | 0% | 19% | 0% | 80%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
xar10% | 0% | 27% | 13% | 48%
xar/deprecated0% | 0% | 52% | 16% | 31%
xar/clean_xar_mounts/src0% | 0% | 19% | 0% | 80%
xar/commands0% | 0% | 0% | 50% | 49%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
215 55 2
63 22 4
28 19 5
49 17 3
94 17 1
46 17 1
53 17 1
32 16 4
37 16 2
95 13 1
51 13 2
91 12 0
57 12 1
28 11 0
34 11 4
28 10 3
23 9 3
25 9 1
37 8 2
16 8 0
20 8 2
28 8 1
16 8 1
23 8 2
8 7 3
30 7 3
26 7 1
21 7 1
21 6 2
18 6 2
12 6 3
16 6 0
18 5 4
12 5 2
15 5 2
31 5 2
73 5 3
21 5 3
6 5 0
13 5 1
13 5 2
16 4 0
12 4 0
9 4 2
11 4 2
22 4 1
16 4 0
14 4 0
19 4 3
6 4 1