openai / openai-agents-js
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 3,912 units with 60,543 lines of code in units (72.1% of code).
    • 3 very complex units (943 lines of code)
    • 18 complex units (3,051 lines of code)
    • 120 medium complex units (7,308 lines of code)
    • 338 simple units (10,923 lines of code)
    • 3,433 very simple units (38,318 lines of code)
1% | 5% | 12% | 18% | 63%
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
ts1% | 5% | 12% | 18% | 63%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages1% | 5% | 12% | 18% | 63%
.agents0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
427 62 1
370 54 3
146 51 1
279 46 9
243 43 1
318 41 1
103 40 1
299 40 7
180 40 3
92 39 1
206 38 1
266 36 6
109 35 1
136 32 2
82 31 2
267 31 1
55 31 2
195 29 1
101 28 3
45 27 2
75 26 1
69 25 2
83 25 2
125 25 2
120 24 1
40 23 1
91 23 1
127 23 1
88 22 5
77 22 3
79 22 2
60 22 1
56 21 1
111 21 5
127 21 1
64 20 3
58 20 1
59 20 1
39 19 1
74 19 1
89 19 1
132 19 1
46 18 1
60 18 3
81 18 2
87 18 1
62 17 1
47 17 1
112 17 1
55 17 1