openai / orchard
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 681 units with 10,641 lines of code in units (74.5% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (595 lines of code)
    • 36 medium complex units (2,329 lines of code)
    • 76 simple units (2,433 lines of code)
    • 564 very simple units (5,284 lines of code)
0% | 5% | 21% | 22% | 49%
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
go0% | 5% | 21% | 22% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal0% | 6% | 24% | 24% | 44%
rpc0% | 0% | 22% | 0% | 77%
pkg0% | 0% | 0% | 20% | 79%
cmd0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
130 40 1
146 37 1
108 30 2
117 28 1
94 27 1
61 23 1
105 22 2
102 21 0
104 21 2
60 20 1
78 18 1
95 18 1
77 17 2
51 16 1
97 16 1
52 15 1
66 15 1
72 15 1
73 15 2
87 15 2
54 14 1
50 14 1
81 14 1
95 14 1
61 14 2
57 13 1
55 13 1
57 12 2
43 12 1
51 12 1
43 12 1
18 12 1
51 12 2
71 12 2
50 12 2
50 12 2
85 12 2
28 11 3
44 11 1
64 11 1
41 11 2
46 10 1
37 10 2
54 10 1
48 10 1
39 10 1
32 10 1
60 10 2
35 9 1
22 9 1