openai / openai-agents-python
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,659 units with 19,336 lines of code in units (26.8% of code).
    • 0 very complex units (0 lines of code)
    • 6 complex units (418 lines of code)
    • 68 medium complex units (2,386 lines of code)
    • 208 simple units (3,839 lines of code)
    • 2,377 very simple units (12,693 lines of code)
0% | 2% | 12% | 19% | 65%
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
py0% | 2% | 12% | 19% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 2% | 11% | 19% | 66%
.github0% | 0% | 58% | 12% | 28%
.codex0% | 0% | 38% | 20% | 40%
.agents0% | 0% | 27% | 15% | 56%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
96 48 3
59 32 1
95 32 1
39 30 1
68 26 2
61 26 1
53 22 2
42 20 2
39 20 2
39 20 2
31 19 3
73 19 3
58 18 2
50 17 3
17 17 1
39 17 0
59 16 0
41 16 2
40 16 3
47 16 2
71 16 2
48 16 2
48 16 2
37 16 2
38 16 2
39 16 2
40 15 3
26 15 1
38 15 1
46 15 3
23 15 2
41 14 1
32 14 1
37 14 2
67 14 1
43 14 2
21 14 1
58 14 0
34 13 3
21 13 2
22 13 3
48 13 0
23 13 2
27 13 1
20 13 2
36 13 2
28 13 1
19 13 2
19 13 1
24 13 2