anthropics / connect-rust
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 793 units with 10,013 lines of code in units (34.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (534 lines of code)
    • 20 simple units (861 lines of code)
    • 764 very simple units (8,618 lines of code)
0% | 0% | 5% | 8% | 86%
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% | 8% | 87%
py0% | 0% | 66% | 7% | 25%
go0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
connectrpc0% | 0% | 5% | 6% | 88%
benches0% | 0% | 11% | 12% | 75%
connectrpc-codegen0% | 0% | 0% | 32% | 67%
connectrpc-build0% | 0% | 0% | 9% | 90%
connectrpc-reflection0% | 0% | 0% | 0% | 100%
connectrpc-health0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
52 23 1
42 18 2
53 17 1
87 14 5
84 13 3
34 12 2
50 12 2
76 12 2
56 11 1
61 10 2
109 10 4
41 9 1
73 8 2
49 8 4
38 8 1
30 8 1
30 7 2
37 7 3
41 7 3
52 7 2
17 7 0
39 7 1
42 6 2
31 6 2
20 6 1
44 6 3
39 6 2
39 6 2
29 6 1
46 5 2
16 5 2
13 5 2
41 5 1
36 5 2
20 5 2
19 5 2
21 5 2
19 5 1
19 5 1
11 5 0
34 5 1
30 5 1
21 5 0
10 4 3
22 4 1
27 4 4
35 4 3
49 4 3
51 4 4
46 4 0