openai / openai-go
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 358 units with 5,812 lines of code in units (83.7% of code).
    • 1 very complex units (157 lines of code)
    • 7 complex units (842 lines of code)
    • 27 medium complex units (1,438 lines of code)
    • 46 simple units (1,180 lines of code)
    • 277 very simple units (2,195 lines of code)
2% | 14% | 24% | 20% | 37%
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
go2% | 14% | 24% | 20% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal3% | 17% | 26% | 16% | 35%
auth0% | 0% | 36% | 29% | 33%
ROOT0% | 0% | 0% | 62% | 37%
azure0% | 0% | 0% | 46% | 53%
packages0% | 0% | 0% | 24% | 75%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
157 51 1
194 49 1
169 47 1
168 47 1
81 34 1
92 29 2
97 27 1
41 26 1
86 24 1
90 24 1
48 23 2
76 22 1
45 22 2
82 22 1
63 22 1
75 21 1
72 20 1
44 19 3
77 17 1
55 17 3
47 15 2
50 14 4
35 14 1
56 14 1
35 14 1
25 13 1
34 13 1
51 13 1
66 12 1
37 12 1
36 12 2
48 12 1
41 11 1
20 11 1
44 11 2
36 10 4
33 10 1
37 10 1
30 10 1
28 9 3
51 9 1
16 9 2
39 9 1
29 9 1
25 9 1
30 9 1
25 8 2
32 8 2
31 8 1
26 8 1