anthropics / orjson
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 603 units with 7,028 lines of code in units (34.8% of code).
    • 2 very complex units (743 lines of code)
    • 3 complex units (317 lines of code)
    • 10 medium complex units (406 lines of code)
    • 34 simple units (1,120 lines of code)
    • 554 very simple units (4,442 lines of code)
10% | 4% | 5% | 15% | 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
c30% | 13% | 8% | 15% | 31%
h0% | 0% | 9% | 18% | 71%
rs0% | 0% | 1% | 15% | 83%
py0% | 0% | 0% | 0% | 100%
pyi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
include19% | 8% | 9% | 16% | 46%
src0% | 0% | 1% | 13% | 85%
ROOT0% | 0% | 0% | 92% | 7%
bench0% | 0% | 0% | 0% | 100%
integration0% | 0% | 0% | 0% | 100%
pysrc0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
369 84 3
374 55 4
112 44 9
73 43 4
132 43 3
30 19 4
47 18 2
47 18 2
51 16 5
44 14 2
48 14 7
45 13 7
52 12 3
21 11 3
21 11 1
64 10 4
69 10 4
75 10 1
23 10 3
36 10 1
24 9 2
25 9 3
22 9 6
39 9 3
22 9 4
42 9 6
40 9 6
66 9 0
21 8 3
24 8 8
27 8 8
29 8 2
27 8 1
20 8 2
14 8 2
18 8 4
30 7 3
15 7 4
133 6 2
33 6 2
33 6 2
21 6 4
13 6 3
13 6 3
22 6 2
12 6 2
22 6 4
23 6 5
23 6 5
15 5 1