anthropics / anthropic-sdk-ruby
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 2,913 units with 14,657 lines of code in units (15.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (578 lines of code)
    • 15 simple units (547 lines of code)
    • 2,889 very simple units (13,532 lines of code)
0% | 0% | 3% | 3% | 92%
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
rb0% | 0% | 11% | 10% | 77%
rbi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 11% | 10% | 77%
rbi0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
86 25 0
121 17 4
86 16 3
55 12 0
74 11 0
51 11 0
32 11 2
43 11 1
30 11 1
58 9 0
78 9 3
24 9 2
53 9 1
114 8 1
41 8 0
23 8 2
37 8 1
28 7 0
35 7 0
17 6 2
6 6 3
13 6 0
12 6 2
8 6 2
17 5 1
23 5 3
12 5 1
42 5 1
26 5 2
13 5 2
26 5 2
21 5 1
17 5 0
7 5 0
28 5 2
16 5 1
29 5 1
5 4 0
9 4 0
8 4 0
37 4 1
9 4 0
5 4 1
13 4 0
5 4 0
5 4 3
11 4 1
5 4 1
23 4 3
11 4 1