facebookincubator / cargo-guppy
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 495 units with 7,128 lines of code in units (6.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (174 lines of code)
    • 6 medium complex units (605 lines of code)
    • 21 simple units (1,281 lines of code)
    • 467 very simple units (5,068 lines of code)
0% | 2% | 8% | 17% | 71%
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
rs0% | 2% | 8% | 17% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
guppy/src0% | 6% | 11% | 16% | 64%
tools/cargo-hakari0% | 0% | 30% | 7% | 62%
tools/hakari0% | 0% | 5% | 29% | 65%
guppy-summaries/src0% | 0% | 22% | 11% | 66%
tools/determinator0% | 0% | 0% | 22% | 77%
cargo-guppy/src0% | 0% | 0% | 35% | 64%
internal-tools/cargo-compare0% | 0% | 0% | 46% | 53%
fixtures/src0% | 0% | 0% | 0% | 100%
target-spec/src0% | 0% | 0% | 0% | 100%
internal-tools/fixture-manager0% | 0% | 0% | 0% | 100%
fixtures/workspace0% | 0% | 0% | 0% | 100%
target-spec0% | 0% | 0% | 0% | 100%
internal-tools/benchmarks0% | 0% | 0% | 0% | 100%
workspace-hack0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
174 28 4
74 20 0
98 20 1
91 12 1
125 12 2
86 11 2
131 11 4
87 10 5
88 10 5
48 9 2
88 9 2
50 8 2
86 8 2
86 8 2
115 8 1
33 8 3
30 7 2
43 7 1
50 7 4
43 7 4
56 7 3
61 7 2
76 7 2
39 6 2
32 6 4
72 6 4
35 6 2
63 6 3
39 5 3
56 5 2
19 5 2
37 5 3
16 5 2
23 5 3
38 5 4
19 4 2
38 4 2
26 4 0
40 4 2
49 4 2
20 4 3
29 4 4
32 4 3
41 4 2
35 4 0
32 4 2
12 3 2
11 3 1
39 3 2
6 3 1