openai / transformer-debugger
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 1,102 units with 6,827 lines of code in units (25.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 16 medium complex units (740 lines of code)
    • 25 simple units (650 lines of code)
    • 1,061 very simple units (5,437 lines of code)
0% | 0% | 10% | 9% | 79%
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
tsx0% | 0% | 31% | 11% | 57%
py0% | 0% | 5% | 8% | 86%
ts0% | 0% | 17% | 16% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
neuron_viewer0% | 0% | 25% | 13% | 61%
neuron_explainer0% | 0% | 5% | 8% | 86%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
40 24 2
45 17 2
115 17 11
27 15 2
25 13 1
52 13 3
32 13 1
217 12 1
20 12 1
20 12 1
30 12 1
33 12 1
18 12 2
26 11 1
21 11 1
19 11 1
24 10 1
63 10 2
30 9 0
38 9 2
34 9 3
81 9 1
84 8 1
29 8 2
14 8 2
28 8 2
12 8 1
18 7 0
17 7 1
6 7 1
26 7 1
25 7 2
28 6 2
5 6 1
19 6 1
8 6 2
8 6 1
19 6 1
7 6 1
15 6 3
12 6 1
13 5 1
19 5 1
49 5 9
14 5 1
11 5 2
14 5 2
11 5 1
6 5 1
12 5 2