anthropics / tokio
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 1,935 units with 18,789 lines of code in units (29.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (617 lines of code)
    • 63 simple units (2,659 lines of code)
    • 1,866 very simple units (15,513 lines of code)
0% | 0% | 3% | 14% | 82%
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% | 0% | 3% | 14% | 82%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tokio0% | 0% | 3% | 12% | 83%
tokio-macros0% | 0% | 18% | 28% | 53%
benches0% | 0% | 3% | 18% | 77%
tokio-util0% | 0% | 0% | 11% | 88%
tokio-test0% | 0% | 0% | 51% | 48%
tokio-stream0% | 0% | 0% | 5% | 94%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
186 21 2
81 18 2
103 16 5
73 14 3
112 13 3
62 11 3
61 10 2
63 10 2
62 10 3
52 10 3
65 9 2
57 9 3
50 9 1
104 9 3
51 8 1
24 8 1
39 8 1
31 8 1
80 8 3
55 8 3
36 8 4
78 8 2
32 8 2
39 8 1
72 8 3
78 8 2
96 7 4
21 7 1
58 7 3
52 7 2
22 7 2
24 7 1
55 7 3
55 7 3
43 7 1
41 7 1
37 7 1
37 7 1
25 7 2
11 6 1
34 6 2
25 6 3
47 6 0
28 6 2
22 6 2
16 6 2
31 6 0
31 6 0
42 6 3
34 6 2