anthropics / anthropic-sdk-csharp
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 10,008 units with 111,173 lines of code in units (57.4% of code).
    • 14 very complex units (8,294 lines of code)
    • 15 complex units (2,711 lines of code)
    • 122 medium complex units (10,749 lines of code)
    • 145 simple units (6,507 lines of code)
    • 9,712 very simple units (82,912 lines of code)
7% | 2% | 9% | 5% | 74%
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
cs7% | 2% | 9% | 5% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src7% | 2% | 9% | 5% | 74%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
1739 241 3
1502 213 1
670 104 3
670 104 3
670 104 3
354 73 3
354 73 3
458 71 3
427 68 3
329 53 3
329 53 3
330 53 3
231 52 3
231 52 3
327 50 3
90 49 2
290 44 3
239 38 3
232 38 3
232 38 3
147 35 34
147 35 34
147 35 34
90 32 2
183 29 3
174 29 3
96 27 0
143 27 6
174 26 3
107 25 24
105 25 24
103 24 23
157 23 3
157 23 3
99 23 22
65 22 1
68 21 1
132 20 3
138 20 3
129 20 3
133 20 3
132 20 3
143 19 1
79 18 17
79 18 17
79 18 17
79 18 17
79 18 17
73 17 16
117 17 3